Path: utzoo!attcan!utgpu!jarvis.csri.toronto.edu!mailrus!ncar!groucho!davis
From: davis@groucho.ucar.edu (Glenn P. Davis)
Newsgroups: comp.sys.next
Subject: Quick question on 'free' method.
Message-ID: <4558@ncar.ucar.edu>
Date: 3 Oct 89 17:08:53 GMT
Sender: news@ncar.ucar.edu
Reply-To: davis@groucho.UCAR.EDU (Glenn P. Davis)
Organization: Unidata/UCAR, Boulder CO
Lines: 35

Suppose I have an object with another object as instance variable:

@interface myObject: Asuperclass
{
   id anotherobject;
   .
   .
}

+new ;
-free ;

@end

I want 'anotherobject' freed at free time.
What should my free method look like?
I guess:

-free
{
	[anotherobject free] ;
	[super free] ;
}

This doesn't fail outright, but I wonder if the [super free] is
being applied to the current object.

Thanks

Glenn P. Davis		davis@unidata.ucar.edu
UCAR / Unidata
PO Box 3000                   1685 38th St.
Boulder, CO 80307-3000        Boulder, CO  80301

(303) 497 8643