Path: utzoo!utgpu!water!watmath!clyde!att!osu-cis!tut.cis.ohio-state.edu!mailrus!cornell!uw-beaver!tektronix!tekcrl!tekgvs!jans From: jans@tekgvs.GVS.TEK.COM (Jan Steinman) Newsgroups: comp.lang.smalltalk Subject: Re: Unwanted Instances Message-ID: <4157@tekgvs.GVS.TEK.COM> Date: 27 Oct 88 19:11:47 GMT Distribution: na Organization: Tektronix Inc., Beaverton, Or. Lines: 22 I don't have a quick answer, but there are ways of avoiding generating "obnoxious objects" in the first place. Any object that is potentially circular (which includes any object that stores BlockContexts) should implement "release", which should always include "super release". "release" should nil the fields that contain BlockContexts or could be circular. (If you're dredging up MethodContexts, your obnoxious object probably references BlockContexts.) The need to store BlockContexts is a real problem, but avoiding direct circularities is a bit easier to deal with. The reasons circular objects are created can often be fulfilled by judicious use of "thisContext", which is the execution state of a particular method. (C++er's drool! You'll never do this!) I've implemented a number of methods for detecting recursion and carrying on a dialog with a sender, and I find I can often use these instead of creating circular references. :::::: Software Productivity Technologies -- Experiment Manager Project :::::: :::::: Jan Steinman N7JDB Box 500, MS 50-383 (w)503/627-5881 :::::: :::::: jans@tekcrl.TEK.COM Beaverton, OR 97077 (h)503/657-7703 ::::::