swarm-support
[Top][All Lists]
Advanced

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

Re: Clarification on the effect of "DROP" on subobjects.


From: Paul E Johnson
Subject: Re: Clarification on the effect of "DROP" on subobjects.
Date: Mon, 30 Oct 2000 08:19:14 -0600


Tim Rogers wrote:
> 
> I've tried searching through the swarm archives, and have looked up the
> details of the call drop under defobj in the reference manual, and I'm
> still a bit confused about what happens to objects which are instance
> variables of another object, which is dropped.
> 
> Suppose we have an object called Wine, inherited from the standard
> SwarmObject, with instance variables as follows:
> 
> Wine
> {
> int cost
> id wineDetails;
> id *wineShop;
> }
> 
> Suppose I want to get rid of a Wine object:
> 
> [aWine drop];
> 
WineDetails and wineShop will not get dropped automatically.  Write a
method which overrides the default.

-(void) drop
{
        [wineDetails Drop];
        [whatever is necessary to free wineShop];
        [super drop];
}

I believe that if you created these objects in a separate zone, and then
dropped the zone, then they would all get wiped out automatically. 
That's allowed,but not standard.

>
-- 
Paul E. Johnson                       email: address@hidden
Dept. of Political Science            http://lark.cc.ukans.edu/~pauljohn
University of Kansas                  Office: (785) 864-9086
Lawrence, Kansas 66045                FAX: (785) 864-5700

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