Ver Fonte

scrub memlogs
ensures you can run leaktrace multiple times without a restart without accumulations

AzaezelX há 4 meses atrás
pai
commit
ab5fcc00e9
1 ficheiros alterados com 2 adições e 0 exclusões
  1. 2 0
      Engine/source/platform/platformMemory.cpp

+ 2 - 0
Engine/source/platform/platformMemory.cpp

@@ -98,6 +98,7 @@ namespace Memory
    {
       if (initialized) return;
       std::memset(allocList, 0, sizeof(allocList));
+      std::memset(memLog, 0, sizeof(memLog));
       allocCount = 0;
       currentAllocId = 0;
       initialized = true;
@@ -209,6 +210,7 @@ namespace Memory
       std::fclose(log);
 
       std::memset(allocList, 0, sizeof(allocList));
+      std::memset(memLog, 0, sizeof(memLog));
       allocCount = 0;
       currentAllocId = 0;
       initialized = false;