Hi Dimitrios, i was reading your article and the referenced article in which it says:
Once the inner function is removed from memory (for instance if the object to which the inner function was attached is removed), then the unique reference to the activation object also gets deleted and the garbage collector will (should) delete both the inner function and the activation object of the outer function at the same time. Now the inner function is what is returned when you use Delegate.create. It seems to me mostly when using a Delegate, you want it to have those references until you dont need the delegate itself anymore. So setting the reference to the inner function to null, should take care of the rest? I'm probably missing something here. greetz JC On 10/16/06, Dimitrios Bendilas <[EMAIL PROTECTED]> wrote:
Hello everyone, I had a really big issue recently, when I realized that the performance of a large-scale game I built in Flash dropping substantially after 1/2 hour of gameplay, to the point where the game became waaaay too slow to play. After exhausting tests I found out that this was caused by the extended use of Delegates with parameters (I always make sure I don't leave garbage sitting around when I destroy objects of all of my classes, so that was not the issue). Spending one week on this, I managed to spot the problem and find a solution, writing a new Delegate class that was taking care of cleaning up function objects. I thought this would interest quite a few people, so I wrote an article on this. You can read at www.zefxis.gr/article-delegates. You can also download the Delegate class I wrote and use it for you projects. I would appreciate any comments on this! Thanks, Dimtirios _______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com
_______________________________________________ Flashcoders@chattyfig.figleaf.com To change your subscription options or search the archive: http://chattyfig.figleaf.com/mailman/listinfo/flashcoders Brought to you by Fig Leaf Software Premier Authorized Adobe Consulting and Training http://www.figleaf.com http://training.figleaf.com