Welcome to mirror list, hosted at ThFree Co, Russian Federation.

git.blender.org/blender.git - Unnamed repository; edit this file 'description' to name the repository.
summaryrefslogtreecommitdiff
diff options
context:
space:
mode:
authorTon Roosendaal <ton@blender.org>2005-06-08 19:09:11 +0400
committerTon Roosendaal <ton@blender.org>2005-06-08 19:09:11 +0400
commitce68fddc0db812dd827ffd2d8bf90fb0badcb90e (patch)
tree0262188b141420626e96a83cdb771b657ca3e89a
parentcf1022ffaa1e60de989bd912b596b238888bf454 (diff)
Made anim player (blender -a) free memory in end, so we can check what the
leak comes from.
-rw-r--r--source/blender/src/playanim.c15
1 files changed, 15 insertions, 0 deletions
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();
+ }
}