From 836c4f29a585e4b176738f64cf8d312171be5fe0 Mon Sep 17 00:00:00 2001
From: Ben Dang main()
exits to do the first
whole-program leak check is waiting too long: e.g. in a long-running
server one might wish to simply periodically check for leaks while the
server is running. In this case, you can call the static method
-NoGlobalLeaks()
, to verify no global leaks have happened
+HeapLeakChecker::NoGlobalLeaks()
, to verify no global leaks have happened
as of that point in the program.
Alternately, doing the check after main()
exits might
@@ -146,8 +146,8 @@ be too late. Perhaps you have some objects that are known not to
clean up properly at exit. You'd like to do the "at exit" check
before those objects are destroyed (since while they're live, any
memory they point to will not be considered a leak). In that case,
-you can call NoGlobalLeaks()
manually, near the end of
-main()
, and then call CancelGlobalCheck()
to
+you can call HeapLeakChecker::NoGlobalLeaks()
manually, near the end of
+main()
, and then call HeapLeakChecker::CancelGlobalCheck()
to
turn off the automatic post-main()
check.
Finally, there's a helper macro for "strict" and "draconian" modes, -- cgit v1.2.1