Hi All,
I am implementing a cache for my application and I would like to allow
my cache to manage memory consumption(limit number of items stored). I
have done this in the past in Java by having my cache hold the only
hard references to the objects, returning weak references to the
application.
I don't understand. Event pointers can be instanciated as weak. Do you
mean an object with a weak reference to another?
e.g
var foo:Object = 'First';
var bar:Object = foo;
// destroy object foo
// foo still exists because of object bar
Alan
However, I cant seem to find any way to
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
Very interesting. Not exactly what I wanted but I guess that's what I
will have to work with in AS.
I was hoping I could just return WeakReferences that would resolve to
the type it is referencing, but for that I guess we need support from
the VM. So seamless in Java.
So for me to implement a
On Tue, Feb 3, 2009 at 11:11 PM, Greg Hess flexeff...@gmail.com 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
5 matches
Mail list logo