Blender
V3.3
|
Go to the source code of this file.
Functions | |
void | MEM_init_memleak_detection () |
void | MEM_use_memleak_detection (bool enabled) |
void | MEM_enable_fail_on_memleak () |
Variables | |
bool | leak_detector_has_run = false |
char | free_after_leak_detection_message [] |
When this has been called and memory leaks have been detected, the process will have an exit code that indicates failure. This can be used for when checking for memory leaks with automated tests.
Definition at line 73 of file leak_detector.cc.
Referenced by arg_handle_debug_exit_on_error().
This should be called as early as possible in the program. When it has been called, information about memory leaks will be printed on exit.
This variable is constructed when this function is first called. This should happen as soon as possible when the program starts.
It is destructed when the program exits. During destruction, it will print information about leaked memory blocks. Static variables are destructed in reversed order of their construction. Therefore, all static variables that own memory have to be constructed after this function has been called.
Definition at line 54 of file leak_detector.cc.
Referenced by main().
Use this if we want to call #exit during argument parsing for example, without having to free all data.
Definition at line 68 of file leak_detector.cc.
References enabled.
Referenced by main().
char free_after_leak_detection_message[] |
Definition at line 14 of file leak_detector.cc.
Referenced by MEM_guarded_freeN(), and MEM_lockfree_freeN().
bool leak_detector_has_run = false |
Definition at line 13 of file leak_detector.cc.
Referenced by MEM_guarded_freeN(), and MEM_lockfree_freeN().