diff --git a/Source/Editor/Windows/Profiler/CPU.cs b/Source/Editor/Windows/Profiler/CPU.cs index d33325fa3..c0cbc0a16 100644 --- a/Source/Editor/Windows/Profiler/CPU.cs +++ b/Source/Editor/Windows/Profiler/CPU.cs @@ -24,6 +24,17 @@ namespace FlaxEngine } } } + + public unsafe bool NameStartsWith(string prefix) + { + fixed (char* name = &Name0) + { + fixed (char* p = prefix) + { + return Utils.MemoryCompare(new IntPtr(name), new IntPtr(p), (ulong)(prefix.Length * 2)) == 0; + } + } + } } } } diff --git a/Source/Editor/Windows/Profiler/Memory.cs b/Source/Editor/Windows/Profiler/Memory.cs index 4cc48ce73..3105996f7 100644 --- a/Source/Editor/Windows/Profiler/Memory.cs +++ b/Source/Editor/Windows/Profiler/Memory.cs @@ -72,6 +72,8 @@ namespace FlaxEditor.Windows.Profiler for (int j = 0; j < ee.Length; j++) { ref var e = ref ee[j]; + if (e.NameStartsWith("ProfilerWindow")) + continue; nativeMemoryAllocation += e.NativeMemoryAllocation; managedMemoryAllocation += e.ManagedMemoryAllocation; }