[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
how to get rid of a List
From: |
Rick Riolo |
Subject: |
how to get rid of a List |
Date: |
Fri, 1 Dec 1995 10:39:13 -0500 (EST) |
I haven't been able to figure out how to get rid of a List
I create such that memory is all given back.
roughly I am doing this:
------
changed = [List create: xZone];
... addLast some agent-objects to the list...
index = [changed begin: xZone];
while ( (ag = [index next]) ) {
[ag resetEh];
}
[index dropFrom: xZone];
[changed drop];
--------------
I also tried [changed dropFrom: xZone].
In both cases I could see M use go up indefinitely.
If I comment out these codes dealing with the changed List,
memory usage is stable. I'm pretty sure its the List and not
the index, since I use the same trick of begin:/dropFrom: indexes
all over the place and that seems to work fine.
So....what do I do to give back all the memory my List is using?
(note that I don't want to get rid of the actual agent objects
in the list...they are not being created or destroyed thru all this.)
thanks!
- r
------
Rick Riolo address@hidden
Program for Study of Complex Systems (PSCS)
1061 Randall Lab University of Michigan
Ann Arbor MI 48109-1120
http://pscs.physics.lsa.umich.edu/rlr-home.html
- how to get rid of a List,
Rick Riolo <=