On Tue, Feb 3, 2009 at 11:11 PM, Greg Hess <[email protected]> wrote:
Objects are all passed by reference, I want to pass a weak reference
> back to callers who request items from the cache, much like the
> internal implementation must do in some way when
> addEventListener(...true) as a weak reference.
>
> For example:
>
> public function getItem( id:String ):Item
> {
> var item:Item = getItemFromCache(id);
> return new WeakReference( item );
> }
>
> So that anyone who has obtained an item from cache will not prevent
> the object from being garbage collected.
>
http://manishjethani.com/blog/2008/07/31/using-weak-references-in-actionscript-3/
Manish