memory - why isn't it getting freed

Robert Brenstein rjb at rz.uni-potsdam.de
Tue Aug 10 19:55:40 EDT 2004


On 8/9/04 9:00 AM, Chris Sheffield wrote:

>Can anyone tell me the reasons for memory not getting freed up like it
>should?
>
>I have an application that consists of a login stack, another main stack
>where most of the program functionality occurs, and then several other
>external stacks (stored as compressed data in a Valentina database) that
>contain multimedia content such as graphics, audio files, text, etc.  These
>stacks get extracted from the database, decompressed, and then accessed to
>retrieve that content.  The problem is, when I'm done with these external
>stacks, I use the delete stack command, which should remove them from
>memory, but it doesn't.  I have checked every function I can think of
>(revLoadedStacks, openStacks, stacksInUse, etc.) to see if Rev thinks these
>stacks are still open in some way, but that is not the case.  The memory
>just doesn't get freed.  It doesn't return to normal until I completely exit
>my application.  This is not a good thing because used memory keeps building
>up and up, until eventually the application crashes because the system has
>run out of memory.
>
>This is a serious problem, and I'm not sure if it's something I'm doing
>wrong, or if I've discovered some bug in Rev.  So what I'm wondering is,
>what would cause memory to not get freed the way it should?  Files that the
>stacks might have open perhaps?  But if that were the case, why would the
>stack not appear when using one of the above functions?  Anything else?

I suspect that at least some of the non-freed memory is coming from 
Valentina caching. When you extract your stacks, the extracted 
content is cached by valentina before being passed to Rev.

Robert Brenstein


More information about the use-livecode mailing list