Quick Links: Gideros Home | Download Gideros | Developer Guide
Is postInit() sent to the built-in classes?
  • 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
  • atilimatilim +1 -1 (+1 / -0 )
    Maintainer Accepted Answer
    Yes you're right. I can fix this issue and release 2012.09.x version.

    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

  • @atilim, that would be great, thanks.

    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

  • atilimatilim +1 -1 (+1 / -0 )
    Yes I can.

    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

  • totebototebo +1 -1
    Were these changes ever implented? When using Leaky now, no internal classes show up with build 2017.4.
    My Gideros games: www.totebo.com

Howdy, Stranger!

It looks like you're new here. If you want to get involved, click one of these buttons!

Login with Facebook Sign In with OpenID

In this Discussion

Top Posters