> Hi,
> I found this thread in Flashcoders that discusses a similar problem I 
> have regarding garbage collection of AS2 classes/components when 
> unloading swfs from the Flash Player...
> 
> garbage collection troubles (Dated: Feb 2005)
> http://chattyfig.figleaf.com/mailman/htdig/flashcoders/2005-February/130253.html
>  
> 
> 
> Has anybody come up with other solutions for this as it seems an 
> important issue for developers working on large applications? To date, I 
> have not as yet explored AS3, Flex 2 or FP9 so I don't know if this has 
> been addressed - i'm developing in Flash 8/AS2.

Classes are stored in _global and are not overwritten if already
defined. This has the following side effects :

- if you have already a global named "MyClass" defined, then the class
is not correctly registered
- you cannot have two versions of the same class at the same time
- classes and all their statics are kept even after removal

One solution is to set the values of _global to null after removing the
loaded clip, but you need to be able to discrimate between your
framework classes and the loaded ones.

That's why for example in haXe (http://haxe.org) classes are stored in
the loaded MovieClip instead of _global.

Nicolas
_______________________________________________
[email protected]
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

Reply via email to