svn merge -r37700:37800 https://svn.blender.org/svnroot/bf-blender/trunk/blender
[blender.git] / source / blender / windowmanager / intern / wm_init_exit.c
index c61db1d653e9e2088a05c2b41fa9c50f72a54c15..aef46f92a3390ac265d0b4bec0e3a604a2b7ec50 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 */
@@ -155,6 +156,7 @@ void WM_init(bContext *C, int argc, const char **argv)
        BPY_python_start(argc, argv);
 
        BPY_driver_reset();
+       BPY_app_handlers_reset();
        BPY_modules_load_user(C);
 #else
        (void)argc; /* unused */
@@ -443,8 +445,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();