[squeak-dev] Re: Best practice(s) to delete an object?

itsme213 itsme213 at hotmail.com
Wed Feb 27 04:18:50 UTC 2008


"John M McIntosh" <johnmci at smalltalkconsulting.com> wrote

> Well first I'll note if you use weak logic the deal is the object that  is 
> only weak referenced will
> be deleted sometime in the future, where the future is milliseconds or 
> maybe days, well maybe not
> days, but if you expect milliseconds, then 5 seconds can kill you.

If all other accessors check-and-remove any item that has been marked as 
deleted then such a delay would be non-critical (I think).

In my case, the weak-ref is only a relatively minor possible optimization, 
my main question is about ref-integrity when an object is deleted, so other 
objects do not visibly behave as though they still had references to it.

Thanks - Sophie






More information about the Squeak-dev mailing list