🚀 go-pugleaf

RetroBBS NetNews Server

Inspired by RockSolid Light RIP Retro Guy

Article View: comp.sys.next.programmer
Article #255

Re: Destroying Zones

#255
From: Ali Ozer
Date: Mon, 27 Jul 1992 14:39
20 lines
1446 bytes
In article <1992Jul27.010436.1749@kakwa.ucs.ualberta.ca> Gary Ritchie writes:
>I'm loading a nib file into its own zone, so that I can later destroy the  
>zone and make everything go away.

It's just a bad idea to destroy a zone which contains kit objects. Some kit
objects (including most of the interesting ones, such as Window, View, Font,
NXImage, etc --- objects you might easily encounter in a .nib file)
allocate resources or change some state.  Their -free method must be called to
dispose of them properly. Also, even if you're sure that a kit object's free
method doesn't do anything interesting, you are not guaranteed that this won't
change in the next release.

There are cases where destroying zones to get rid of objects will work.
If you have some simple object whose free simply frees itself or frees
other similary simple objects, and your collection of objects are all in
one zone, with no errant pointers into the zone and no unknown objects
in the zone, then you can probably destroy the zone to get rid of the objects,
avoiding many calls to free().

Ali, Ali_Ozer@NeXT.com
Technical Details
Message-ID: <4483@rosie.NeXT.COM>
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
References: <1992Jul27.010436.1749@kakwa.ucs.ualberta.ca>

Show Full Headers
Complete Article Headers
Path: arc1-ca.pugleaf.net!sparky!uunet!rosie!aozer
From: aozer@next.com (Ali Ozer)
Newsgroups: comp.sys.next.programmer
Subject: Re: Destroying Zones
Message-ID: <4483@rosie.NeXT.COM>
Date: 27 Jul 92 14:39:25 GMT
References: <1992Jul27.010436.1749@kakwa.ucs.ualberta.ca>
Sender: news@NeXT.COM
Organization: Next Computer, Inc.
Lines: 26