=bmesh= merge from trunk at r36529
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index b09e264bd1d14d0012848756352c1b0925c4f69b..2a37654a23bc0a21d0491bdd9c7d692daa445f19 100644 (file)
@@ -63,6 +63,7 @@
 #include "BKE_material.h" /* clear_matcopybuf */
 
 #include "BLI_blenlib.h"
+#include "BLI_cellalloc.h"
 #include "BLI_winstuff.h"
 
 #include "RE_pipeline.h"               /* RE_ free stuff */
@@ -459,8 +460,10 @@ void WM_exit(bContext *C)
        GHOST_DisposeSystemPaths();
 
        if(MEM_get_memory_blocks_in_use()!=0) {
-               printf("Error: Not freed memory blocks: %d\n", MEM_get_memory_blocks_in_use());
+               printf("Error: Not freed memory blocks: %d\n", MEM_get_memory_blocks_in_use()+BLI_cellalloc_get_totblock());
                MEM_printmemlist();
+               BLI_cellalloc_printleaks();
+               BLI_cellalloc_destroy();
        }
        wm_autosave_delete();