suppress "mem_list leaks" messages when the number of objects is zero

git-svn-id: file:///srv/svn/repos/haiku/trunk/current@10074 a95241bf-73f2-0310-859d-f6bbb57e9c96
This commit is contained in:
shatty
2004-11-21 02:01:39 +00:00
parent ae185b834d
commit adde77da57
+3 -1
View File
@@ -119,7 +119,9 @@ void free_mem(void* ptr)
static void clean_up_mem()
{
#ifdef DEBUG
printf("mem_list leaks %ld objects\n", mem_list.size());
if (mem_list.size() != 0) {
printf("mem_list leaks %ld objects\n", mem_list.size());
}
for (mem_iter_t i = mem_list.begin(); i != mem_list.end(); )
{
printf("%p allocated at %s:%ld\n", i->ptr, i->file, i->line);