swarm-support
[Top][All Lists]
Advanced

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

Re: Swarms, zones, dropping, and resource management.


From: Marcus G. Daniels
Subject: Re: Swarms, zones, dropping, and resource management.
Date: 27 Apr 1999 18:23:00 -0700

>>>>> "AB" == Albert-Jan Brouwer <address@hidden> writes:

AB> Then the commentary in the ExperSwarm.m example is somewhat
AB> misleading:

  //  We drop the modelSwarm's activity, and then drop the modelSwarm
  // itself which drops of the objects built by modelSwarm
                  ^^^^^
  [[modelSwarm getActivity] drop];
  [modelSwarm drop];

AB> Speaking of which, is it essential to first drop the activity?

Nope.  The first line isn't necessary.  Destroy notification is used
to drop a Swarm's activity.  I've updated our tutorial sources for the
next release.  Thanks for pointing this out.

AB> In general, can it be assumed that all objects created from support classes
AB> that are part of the Swarm system clean up any additional resources they
AB> might have allocated when the zone that contains them is dropped?

Features from defobj, collections, and activity should be well-behaved
in this respect.  The other libraries still do explicit deallocation 
in various places.  What can I say?

AB> For example, from the documentation of OutFile in the simtools library,
AB> which says that its drop method closes the opened file and must be called
AB> to close it, it would seem that destruction of an OutFile instance upon
AB> freeing a zone leaves the file open (as its drop method is not called).

..afraid so.

AB> Regarding the zone (protocol support) of a swarm, can it already be used
AB> during the create phase or may objects be allocated within a swarm
AB> only after createEnd?

The internal zone of a Swarm is not allocated until its createEnd.
The Zone you'd be using in +createBegin: would probably the argument;
the parent zone.

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