PureMVC Architects Lounge

Announcements and General Discussion => General Discussion => Topic started by: Kimi on January 15, 2009, 07:22:37



Title: removeAllProxies and removeAllMediators
Post by: Kimi on January 15, 2009, 07:22:37
When deleting/cleaning an application i want to remove all registered proxies and mediators from the model and view. Would'nt it be great, if the model had the method removeAllProxies() and the view removeAllMediators()?
The Method iterates the proxyMap and calls the removeProxy method. The same with the view.
This would help cleaning/deleting an application module when removing it from a core application (garbage collection).


Title: Re: removeAllProxies and removeAllMediators
Post by: puremvc on January 15, 2009, 10:00:22
When you unload a module, as long as you aren't retaining any references to things inside that module, you don't have to completely deconstruct it to make its pieces be GC'd. Check out this article on Garbage Collection by Simon Bailey. He really crunched the MultiCore GC problem hard:

http://www.nutrixinteractive.com/blog/?p=132

-=Cliff>