see ya later allocator
This commit is contained in:
parent
57d5591d4a
commit
fa2d0aaa92
44 changed files with 32 additions and 1693 deletions
|
|
@ -1,36 +0,0 @@
|
|||
# Profiling
|
||||
|
||||
## Memory Leaks
|
||||
|
||||
Example program with memory leaks:
|
||||
|
||||
```c++
|
||||
#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.
|
||||
|
||||

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

|
||||
|
||||
Loading…
Add table
Add a link
Reference in a new issue