Menu

Why .delete() and not finalize()?

2008-04-29
2013-04-25
  • Tim Ringenbach

    Tim Ringenbach - 2008-04-29

    I'm not quite an expert on Java so this may but a dumb question, but....

    I noticed the api makes you call .delete() explicitly a lot. I was left wondering why finalize() wasn't use for that purpose instead? Especially if the delete() is just freeing memory on the c++ heap (as oppose to release some more important resource).  Does (or shouldn't?) finalize() at least call delete for you in case you forgot?

    Thanks,
    Tim

     
    • Anonymous

      Anonymous - 2008-04-29

      Hello Tim,

      you may read this thread: https://sourceforge.net/forum/message.php?msg_id=4537871. Additionally I may read the white paper http://ogre4j.wiki.sourceforge.net/White+Paper to learn more about ogre4j and the ideas behind it.

      BTW this discussion should take place in the developers forum.

      Greetings, Kai

       

Log in to post a comment.