Message2591
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.
|
|
Date |
User |
Action |
Args |
2008-02-20 17:18:37 | admin | link | issue1634167 messages |
2008-02-20 17:18:37 | admin | create | |
|