Memory Leak in Flasheff?

Posted by krumedia 
Memory Leak in Flasheff?
April 01, 2011 07:07PM
Memory usage is increasing for every created object of Flasheff. Is there a problem with the Array FlashEff2.targetPaths that won't release object references? (If I understand it right what Flash Builder Profiler had shown.)
Re: Memory Leak in Flasheff?
April 04, 2011 11:37AM
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
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:

		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
You are right, and we already planned in doing this for our next version.
Sorry, you do not have permission to post/reply in this forum.