destructors, how?

John M McIntosh johnmci at smalltalkconsulting.com
Wed Oct 23 19:53:15 UTC 2002


On Wednesday, October 23, 2002, at 05:31  AM, Peter Crowther wrote:

>> From: Philip Metz [mailto:metzp at interlog.com]
>> Pardon my ignorance, but how is it possible to access an object
>> *after* it has been GCd?
>
> It isn't.  The object is asked for its executor - the thing that deals
> with cleaning up after its death.  The executor typically maintains a
> copy of sufficient of the object's state to be able to do the cleanup.
>
> 		- Peter
>

I'll point out some smalltalk implementations ask the executor what to  
do and give it reference to the 'dead' object as part of the  
finalization process. The executor can then decide to 'resurrect' the  
'dead' object by making a reference to it again. Tho somehow my head  
hurts when asked to justify this action and the business model that  
would require you to do it.


I'll also mention in many years of being asked 'why questions' about  
finalization issues I aways say
the weak object will go away some day in some fast to slow  
serialized/parallel way depending on the smalltalk implementation and  
smalltalk version. If you're assuming it does 100 per second every 1/2  
second or so, or something of that nature you are in trouble, it's lazy  
and some flavors you might need to kick.


--
======================================================================== 
===
John M. McIntosh <johnmci at smalltalkconsulting.com> 1-800-477-2659
Corporate Smalltalk Consulting Ltd.  http://www.smalltalkconsulting.com
======================================================================== 
===




More information about the Squeak-dev mailing list