swarm-support
[Top][All Lists]
Advanced

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

Re: Trouble Memory


From: glen e. p. ropella
Subject: Re: Trouble Memory
Date: Tue, 11 May 1999 07:15:21 -0600

At 10:12 AM 5/11/99 +0200, you wrote: 
>
> Initially, in the simulation there are n-Agent and the Scheduler calls for
> each agent the message processMessage. 
> The problem is that the use of memory raises quickly. I thought that with
> [curPopMap removeAll] I could free the memory.
> I will welcome any suggestions on how to handle this problem and any
> suggestions about memory administration. 


Hey Nico,

Take a look at the reference manual for Swarm, where it says
in the Collection protocol:

- (void)removeAll
    The removeAll message removes all existing members of a collection and
sets
its
    member count to zero. The collection then remains valid for further
members
to be
    added. This message has no effect on the objects which might be referenced
by any
    removed member values. If resources consumed by these objects also need to
be
    released, such release operations (such as drop messages) can be performed
prior to
    removing the member values.

This means that what you actually want to do is drop all
the elements in the map then drop the Map, itself.  Not
only do you have the objects floating around out there
after you do the removeAll, but you also reset the map
pointer without dropping the previous map.

glen 
--
glen e. p. ropella                =><=          Hail Eris!
Home: http://www.trail.com/~gepr/home.html  (505) 424-0448
Work: http://www.swarm.com                  (505) 995-0818  

                  ==================================
   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]