Message2591

Author leouserz
Recipients
Date 2007-01-12.18:07:31
SpamBayes Score
Marked as misclassified
Message-id
In-reply-to
Content
There may be more mutation problems beyond __del__:
    // Store these methods for performance optimization

    // These are only used by PyInstance

    PyObject __getattr__, __setattr__, __delattr__, __tojava__, __del__,

            __contains__;


from "PyClass".  If these are mutated I don't see any corresponding change code in the PyClass instance that will reset these fields.

----------------------

A possible different solution to the mutating __del__ problem is to use a variation on the FinalizerGuardian from Effective Java.
1. Keep track of all PyInstances created by the PyClass
2. If __del__ is altered iterate the PyInstances and add/delete a FinalizerGuardian whose responsibility is to __del__ the PyInstance when itself is finalised.

This is good in that it makes the PyInstance finalizability changable on the fly.  Its bad because its going to add alot of references to the system and a special object for finalising.

History
Date User Action Args
2008-02-20 17:18:37adminlinkissue1634167 messages
2008-02-20 17:18:37admincreate