svn merge ^/trunk/blender -r40644:40720
[blender-staging.git] / source / blender / windowmanager / intern / wm_init_exit.c
index 766be796484c02a8bb6146b290fd33e146cfa1d8..4639e2a0514a8145d7d66acfba975b00ba865e74 100644 (file)
@@ -64,6 +64,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_ext(bContext *C, const short do_python)
        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();