swarm-support
[Top][All Lists]
Advanced

[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]

Re: Problems with Map


From: Marcus G. Daniels
Subject: Re: Problems with Map
Date: 19 Mar 1999 08:03:29 -0800

>>>>> "FM" == Fabio Mascelloni <address@hidden> writes:

FM> Even if I realize the first method was not much correct (if the
FM> same member of the list was selected twice in the same iteration
FM> every change on selMem1 had the side effect to change also
FM> selMem2),I still don't understand why that caused an unordered
FM> insertion in the Map. 

Unless you show the exact sequence of insertions, the contents of the
Map before and after, with keys and values, I can't give you a better
explanation.  But if you're mutating an object and inserting it twice,
it's plausible that the compare functions could have faulty
information when it ran.  

FM> are these copies put in the same memory zone in
FM> which selMem1 & selMem2 were first created,or in a new zone?

The code you show uses [self getZone], which is the same zone. 

That means you'd need to keep tabs on the stuff you've allocated, since
you can't drop the whole Zone in this context.  One way to keep tabs
on stuff is to create a subzone and take care to allocate everything in
it, e.g. subZone = [Zone create: [self getZone]].

                  ==================================
   Swarm-Support is for discussion of the technical details of the day
   to day usage of Swarm.  For list administration needs (esp.
   [un]subscribing), please send a message to <address@hidden>
   with "help" in the body of the message.



reply via email to

[Prev in Thread] Current Thread [Next in Thread]