Okay, I've been thinking about this as I dig through object stuff. (Whee!)

What I'm thinking is that when we're in a DESTROY method (of any type, I don't care) we tag the object as partially destroyed as soon as control leaves DESTROY and if code outside that first DESTROY tries to reparent the object, we throw an exception. That way we allow the first DESTROY we call to reparent the object (if it has some reason to) but once we've left that first DESTROY and therefore may have a partially dead object it's too late and we can't.

This does require tracking pointer stores and generations, unfortunately.
--
                                        Dan

--------------------------------------"it's like this"-------------------
Dan Sugalski                          even samurai
[EMAIL PROTECTED]                         have teddy bears and even
                                      teddy bears get drunk

Reply via email to