Hi
@atilim,
I thought I would respond to
another recent thread about memory leaks with a little bit of instrumentation code to report snapshots of the object memory state at a given time. However, the code I wrote relies on all objects receiving postInit(). As far as I can see, the built in classes don't get this function called on them. Is this true and, if so, can it be changed?
I've attached the sample project, in case you'd like to take a look. At present, I have to create my own Bitmap subclass (MyBitmap) in order for it to work. Obviously, this wouldn't be practical in general.
best regards
Comments
Currently it's not possible to change the behaviour of built-in classes by modifying Core.class. Therefore a new version is needed.
Thank you.
Likes: bowerandy
Could you also make EventDispatcher subclass from a god class Object at the same time? That will open up a lot of potential (as we discussed in that other thread). You don't need to add any functions to this class; it can just be a placeholder so we can add stuff ourselves. There should be no performance hit and little chance of breaking anything.
best regards
And currently the inheritance of built-in classes are handled with a small C code. If they also use Core.class, they can be easily modified in the future.
Likes: bowerandy