Modules/Allocators
2024-03-20 10:01:05 +03:00
..
private Widget Example added 2024-03-20 10:01:05 +03:00
public tmp 2024-03-16 12:51:09 +03:00
tests tmp 2024-03-15 23:42:10 +03:00
CMakeLists.txt tmp 2024-03-15 23:42:10 +03:00
README.md Edit todo and status texts 2024-03-07 13:28:59 +03:00

Profiling

Memory Leaks

Example program with memory leaks:

#include "allocators.h"

void test_call22() { new int; }
void test_call21() { new float; }

void test_call11() {
  test_call21();
  test_call22();
}

int main(char argc, char* argv[]) {
  tp::ModuleManifest* ModuleDependencies[] = { &tp::gModuleAllocators, NULL };
  tp::ModuleManifest TestModule("Test", NULL, NULL, ModuleDependencies);
  TestModule.initialize();
  
  test_call11();
  
  TestModule.deinitialize();
}

If memory leaks were detected it will be logged in the output console.

image

Also debug.memleaks binary will be generated in the working directory that can be viewed with MemLeaks Viewer.

image