X-Git-Url: https://git.saurik.com/wxWidgets.git/blobdiff_plain/7fe7d506b191a94ce327c2a18733a4d3bc576cac..5b6ec9803a058368a1b240a22d444c7301c5715a:/src/common/memory.cpp diff --git a/src/common/memory.cpp b/src/common/memory.cpp index 8f9b0d0ac3..602a295bb8 100644 --- a/src/common/memory.cpp +++ b/src/common/memory.cpp @@ -902,11 +902,15 @@ int wxDebugContext::Check(bool checkAll) // Count the number of non-wxDebugContext-related objects // that are outstanding -int wxDebugContext::CountObjectsLeft(void) +int wxDebugContext::CountObjectsLeft(bool sinceCheckpoint) { int n = 0; - - wxMemStruct *from = wxDebugContext::GetHead (); + + wxMemStruct *from = NULL; + if (sinceCheckpoint && checkPoint) + from = checkPoint->m_next; + if (from == (wxMemStruct*) NULL) + from = wxDebugContext::GetHead () ; for (wxMemStruct * st = from; st != 0; st = st->m_next) {