From ce68fddc0db812dd827ffd2d8bf90fb0badcb90e Mon Sep 17 00:00:00 2001 From: Ton Roosendaal Date: Wed, 8 Jun 2005 15:09:11 +0000 Subject: Made anim player (blender -a) free memory in end, so we can check what the leak comes from. --- source/blender/src/playanim.c | 15 +++++++++++++++ 1 file changed, 15 insertions(+) diff --git a/source/blender/src/playanim.c b/source/blender/src/playanim.c index 0e4f0bd58e9..f91f97aa54c 100644 --- a/source/blender/src/playanim.c +++ b/source/blender/src/playanim.c @@ -69,6 +69,7 @@ #include "BDR_editcurve.h" +#include "BKE_blender.h" #include "BKE_global.h" #include "BKE_utildefines.h" @@ -739,6 +740,9 @@ void playanim(int argc, char **argv) anim = picture->anim; IMB_close_anim(anim); } + if(picture->ibuf) IMB_freeImBuf(picture->ibuf); + if(picture->mem) MEM_freeN(picture->mem); + picture = picture->next; } #ifdef WITH_QUICKTIME @@ -751,4 +755,15 @@ void playanim(int argc, char **argv) } #endif /* _WIN32 || __APPLE__ */ #endif /* WITH_QUICKTIME */ + + /* cleanup */ + if(ibuf) IMB_freeImBuf(ibuf); + BLI_freelistN(picsbase); + free_blender(); + window_destroy(g_window); + + if(totblock!=0) { + printf("Error Totblock: %d\n",totblock); + MEM_printmemlist(); + } } -- cgit v1.2.3