Hi Joerg,
while tracking down other memory leaks in the sequencer, I noticed, that audaspace consistently leaks memory.
Apply the attached patch, recompile, add a mp3 file to an empty sequencer timeline, play it back and close blender.
Notice leak. (two calls to constructor, one call to destructor only) (Problem is: that can take up rather serious amounts of memory, since ffmpeg seems to allocate buffers very generiously in the 2-3 megabyte range.)
I tried to figure out, how that happens, but I'm a little bit lost after an hour of searching...
(you might want to run blender with valgrind --leak-check=full --show-reachable=yes ./blender 2>/tmp/valgrind.out once in a while, to make sure, it doesn't leak memory...)
Cheers, Peter
Example:
$ ./blender found bundled python: /home/peter/svn/blender.svn/install/linux2/2.55/python AUD_FFMPEGReader::construct(/home/peter/mp3s/take1_declipped.wav.mp3): 0xc8b4208 AUD_FFMPEGReader::construct(/home/peter/mp3s/take1_declipped.wav.mp3): 0xc8bb9a8 AUD_FFMPEGReader::destruct(): 0xc8bb9a8 *bpy stats* - tot exec: 694, tot run: 0.1239sec, average run: 0.000178sec, tot usage 0.1151% Saved session recovery to /tmp/quit.blend Error Totblock: 2 IDProperty group len: 76 0xb2c16028 uiAfterFunc len: 616 0xb2c03258
Blender quit
|