detecting mem leaks if have singleton

Started by
0 comments, last by edwinnie 20 years, 1 month ago
okies...=) lets say i got a program uses a singleton (loki), and i need to detect mem leaks (if there are any), without the problem of detecting the singleton as leaking, i mean how do i do that since _CrtDumpMemoryLeaks() is usually placed at the end of the program, and the singleton being only removed after the program exited? thx! Edwin
Advertisement
Well one thought is that if you know that the memory leak being dumped is your singleton, you can ignore it.

Also you can change Loki''s singleton to use static storage rather than heap memory, so it won''t show up on the leak detector. You do this by using the CreateStatic<> policy.

This topic is closed to new replies.

Advertisement