[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
Re: Temporal Lists
From: |
Alex Lancaster |
Subject: |
Re: Temporal Lists |
Date: |
11 Jul 2000 03:25:31 -0600 |
User-agent: |
Gnus/5.0803 (Gnus v5.8.3) Emacs/20.6 |
>>>>> "DA" == David Aliaga <address@hidden> writes:
[...]
DA> After this the method initializeMyValues finish. (it is going to
DA> be called again for other objects)
DA> The question is since the list is a variable inside the scope of
DA> the method, when it finish , the list (and the memory ocupied by
DA> it) also dissapear? ( or should I explicitily call something [list
DA> drop]?
If you allocate an object, which is a local variable, you always need
to `drop' it when it goes out of scope. Objective C does _not_ have
automatic garbage collection. [In Java, an allocated local variable
_would_ be garbage collected when the method was exited. You might
consider using the Java interface if you aren't completely comfortable
with Objective C or C++ style memory allocation].
DA> i ask this because the next time I call initialize My Values I am
DA> going to create again the list and everything so I dont wanna use
DA> more and more memory.
DA> By the way Why should we use drop with index when they are use
DA> temporally.
Because creating an index consumes memory, and that memory needs to be
freed after it is not needed (the runtime environment doesn't do that
for you).
Alex
--
Alex Lancaster * address@hidden * www.santafe.edu/~alex * 505 984-8800 x242
Santa Fe Institute (www.santafe.edu) & Swarm Development Group (www.swarm.org)
==================================
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.