aha! thanks so we have weakreferences... but only for the *keys* of the dictionary... but i need them for the values so I can create ordered lists and maps
list[0] = weaklyReferencedObject1; list[1] = weaklyReferencedObject2; list[2] = weaklyReferencedObject3; map["blabla"] = weaklyReferencedObject4; map["bloblo"] = weaklyReferencedObject5; of course I could iterate through the keys of a dictionary. that would spit out the order in which the keys were added, right? now, another way would be to use one dictionary per entry ( on another dictionary or on a simple object ). I would then know that the weakly referenced object I am interested in is THE ONLY KEY available... I could wrap this into a custom class using flash_proxy to make it more usable. hmm but what about performance. ideas?? is there any class in the framework that has weakreferences for the values instead of the keys? thx, Aldo On 9/15/06, Ralf Bokelberg <[EMAIL PROTECTED]> wrote: > Isn't this, what the Dictionary's constructor parameter is for? > Cheers, > Ralf. > > On 9/15/06, Aldo Bucchi <[EMAIL PROTECTED]> wrote: > > Hi Ralf, > > > > Yeah, that is useful for some cases... but this one is kind of the > > other way around... > > > > I need something in the lines of: > > > > allPeople:Array; // holds all people > > > > nicePeople:WeakReferenceDict; // an index that is built once and then > > queried many many times > > uglyPeople:WeakReferenceDict;// another index > > > > now, when someone is deleted from the allPeople collection I would > > like the garbage collector to know that it can freely delete it from > > the other indexes... instead of having the object stay there forever > > because there is a hard reference to it in the index. > > > > take a look at > > http://www-128.ibm.com/developerworks/java/library/j-jtp11225/ > > > > for instance > > > > Thanks, > > Aldo > > > > > > > > > > On 9/15/06, Ralf Bokelberg <[EMAIL PROTECTED]> wrote: > > > Take a look at flash.util.Dictionary > > > Cheers, > > > Ralf. > > > > > > On 9/15/06, Aldo Bucchi <[EMAIL PROTECTED]> wrote: > > > > hi all, > > > > > > > > I am trying to implement indexes over collections of objects that have > > > > a relatively short lifetime... is there any way to weakly reference > > > > them in as3 to hint the garbage collector?? > > > > > > > > thx, > > > > Aldo > > > > > > > > -- > > > > ::::: Aldo Bucchi ::::: > > > > mobile (56) 8 429 8300 > > > > > > > > > > > > -- > > > > Flexcoders Mailing List > > > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > > Search Archives: > > > > http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > > Ralf Bokelberg <[EMAIL PROTECTED]> > > > Flex & Flash Consultant based in Cologne/Germany > > > > > > > > > -- > > > Flexcoders Mailing List > > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > > -- > > ::::: Aldo Bucchi ::::: > > mobile (56) 8 429 8300 > > > > > > -- > > Flexcoders Mailing List > > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > > Yahoo! Groups Links > > > > > > > > > > > > > > > > > > > > > > > > > -- > Ralf Bokelberg <[EMAIL PROTECTED]> > Flex & Flash Consultant based in Cologne/Germany > > > -- > Flexcoders Mailing List > FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt > Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com > Yahoo! Groups Links > > > > > > > > > > -- ::::: Aldo Bucchi ::::: mobile (56) 8 429 8300 -- Flexcoders Mailing List FAQ: http://groups.yahoo.com/group/flexcoders/files/flexcodersFAQ.txt Search Archives: http://www.mail-archive.com/flexcoders%40yahoogroups.com Yahoo! Groups Links <*> To visit your group on the web, go to: http://groups.yahoo.com/group/flexcoders/ <*> Your email settings: Individual Email | Traditional <*> To change settings online go to: http://groups.yahoo.com/group/flexcoders/join (Yahoo! ID required) <*> To change settings via email: mailto:[EMAIL PROTECTED] mailto:[EMAIL PROTECTED] <*> To unsubscribe from this group, send an email to: [EMAIL PROTECTED] <*> Your use of Yahoo! Groups is subject to: http://docs.yahoo.com/info/terms/

