Home
> FlashEff 2.0 Flex
> Topic
Memory Leak in Flasheff?
Posted by krumedia
Memory Leak in Flasheff? April 01, 2011 07:07PM | Registered: 13 years ago Posts: 25 |
Re: Memory Leak in Flasheff? April 04, 2011 11:37AM | Admin Registered: 15 years ago Posts: 547 |
The memory is increasing constantly or just when you add a new instance?I'm asking, because it is normal to increase while you add a new flasheff instance with an effect on it. If you don't use a instance anymore call the removeAll method and remove it from stage(and if is necessary to set it null).
Re: Memory Leak in Flasheff? April 04, 2011 01:55PM | Registered: 13 years ago Posts: 25 |
The memory consumption is not increasing constantly. The main problem was, that the instance of FlashEff prevented garbage collection of detached view objects. removeAll() is a solution which i added to the derived class:
For future version of FlashEff it would be nice if your class design would respect object lifetime meaning you react on ADDED_TO_STAGE and REMOVED_FROM_STAGE to acquire and release resources respectively.
private function removedFromStageHandler(e:Event):void { this.removeAll(); }
For future version of FlashEff it would be nice if your class design would respect object lifetime meaning you react on ADDED_TO_STAGE and REMOVED_FROM_STAGE to acquire and release resources respectively.
Re: Memory Leak in Flasheff? April 04, 2011 02:48PM | Admin Registered: 15 years ago Posts: 547 |
Sorry, you do not have permission to post/reply in this forum.