View · Search · Index
No registered users in community xowiki
in last 10 minutes

[Xotcl] destroy logic

From: Kristoffer Lawson <setok_at_fishpool.com>
Date: Thu, 18 Jan 2001 15:56:49 +0200 (EET)

Is operation of the destroy method documented in more detail
somewhere? What I'm concerned about is how destroy works when method calls
to an object are still active? Obviously if a method itself calls destroy,
the object will appear to exist until the method returns. But can this
method still call other methods?

The difficult question, I suppose, is what happens if say a fileevent is
activated which destroys an object that still has a method running? We are
coming up with some strange errors in our application for just this kind
of situation and I'm wondering if in fact the object if destroys when this
fileevent is run (which would differ from the situation that a method
itself calls destroy -- which still allows the method itself to run
normally). The problem is that exactly replicating this isn't easy. It
pops up in some situations. We get errors like "[self] called after
destroy" apparently in the middle of a method that is still running, the
destroy probably coming from an external influence.

         - ---------- = = ---------//--+
         | / Kristoffer Lawson | www.fishpool.fi|.com
         +-> | setok_at_fishpool.com | - - --+------
             |-- Fishpool Creations Ltd - / |
             +-------- = - - - = --------- /~setok/