swarm-support
[Top][All Lists]
Advanced

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

Re: memory in java


From: Marcus G. Daniels
Subject: Re: memory in java
Date: 23 Dec 1999 18:02:02 -0800
User-agent: Gnus/5.070084 (Pterodactyl Gnus v0.84) Emacs/20.4

>>>>> "JR" == Juan A Rodriguez <address@hidden> writes:

JR> We currently have out of memory errors after
JR> a high number of steps in the simulation. I though that enforcing
JR> garbage collection could help but it doesn't.  Any workaround for
JR> this? 

There is a directory that associates Java objects with Objective C
objects.  Only Java objects that somehow touch Swarm interfaces (say,
targets of Actions), have entries in this directory.  By virtue of
being in this directory, the Java-side objects aren't touched by
garbage collection.  When you have agents that subclass from Swarm
classes (say SwarmObjectImpl), then it is necessary to drop them
explicitly to remove them from the directory.

So, one piece of advice is to avoid subclassing agents from
SwarmObjectImpl.  Realize that instances of any *Impl class in
swarm.*.* packages are immune from garbage collection.

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