merge with/from trunk at r35190
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index a797b46102537455266e9795fa58fa73cfc9d2bb..34a6359b6dca8d01e8aa3eb7ddbf136e57d87261 100644 (file)
@@ -63,6 +63,7 @@
 #include "BKE_material.h" /* clear_matcopybuf */
 
 #include "BLI_blenlib.h"
+#include "BLI_cellalloc.h"
 
 #include "RE_pipeline.h"               /* RE_ free stuff */
 
@@ -457,8 +458,11 @@ void WM_exit(bContext *C)
        
        GHOST_DisposeSystemPaths();
 
-       if(MEM_get_memory_blocks_in_use()!=0) {
-               printf("Error Totblock: %d\n", MEM_get_memory_blocks_in_use());
+       if(MEM_get_memory_blocks_in_use()!=0 || BLI_cellalloc_get_totblock()!=0) {
+               printf("Error Totblock: %d\n", 
+                       BLI_cellalloc_get_totblock()+MEM_get_memory_blocks_in_use());
+               BLI_cellalloc_printleaks();
+               BLI_cellalloc_destroy();
                MEM_printmemlist();
        }
        wm_autosave_delete();