Article View: comp.lang.clos
Article #324Re: How to neatly destroy instances?
From: Tim Larkin
Date: Tue, 13 Oct 1992 16:37
Date: Tue, 13 Oct 1992 16:37
26 lines
1554 bytes
1554 bytes
In article <1992Oct13.142031.569@colorado.edu> PeiYu Huang, huangp@wasser.Colorado.EDU writes: > Because I use a class variable list to maintain all current instances >of that class for browsing purpose. One can use a form in an >"initialize-instance :after" method to update the list. I guess I may need to >define another method to >clean up the list BEFORE destroying the instance, say my-instance, otherwise when >my-instance becomes unbound, I can no longer access the list via it. I may be missing something here, but if the instance belongs to the class variable list, and neither belongs to any other set nor is the value of any global symbol, then to "destroy" it, by which I infer you mean to recover its allocated memory, you need only to remove it from the class list. The gc will then recover the memory. I guess I'm not too certain what you mean by "destroy". Tim Larkin Federal Nutrition Laboratory Tower Road Ithaca, New York tsl1@cornell.edu 607-255-7008
Technical Details
Message-ID:
<1992Oct13.163725.18853@mail.cornell.edu>Path:
arc1-ca.pugleaf.net!sparky!uunet!newsstand.cit.cornell.edu!newsReferences:
<1992Oct12.223505.12266@colorado.edu>Show Full Headers
Complete Article Headers
Newsgroups: comp.lang.clos,comp.lang.lisp Path: arc1-ca.pugleaf.net!sparky!uunet!newsstand.cit.cornell.edu!news From: Tim Larkin <tsl1@cornell.edu> Subject: Re: How to neatly destroy instances? Message-ID: <1992Oct13.163725.18853@mail.cornell.edu> X-Xxdate: Tue, 13 Oct 92 17: 45:04 GMT Sender: news@mail.cornell.edu Nntp-Posting-Host: 128.253.27.134 Nntp-Posting-User: tsl1@cornell.edu Organization: Cornell University X-Useragent: Nuntius v1.1.1d7 References: <1992Oct12.223505.12266@colorado.edu> Date: Tue, 13 Oct 1992 16:37:25 GMT Lines: 26