iNTERFACEWARE Products Manual > Installing and Using Chameleon > Language API Documentation > Java Support > Garbage Collection Issues > Generating Messages |
|
Looking for Iguana v.5 or v.6? Learn More or see the Help Center.
No problem as long as no exceptions are thrown. When generating messages, the generateMessage method will call release on the underlying table. As a consequence, it results in an error if you try and call generateMessage twice on the same message object. The only thing you need to be aware of is that if an exception is thrown in the code you use to populate the message object, and unless you explicitly put a try...finally block to ensure that the release() method is called, there is a small risk that it will not be called. Usually the java interpreter will invoke the finalize() method which will fix the situation. You will not have to worry about this issue for the most part. Having an exception thrown in your message generation code is usually an indication of a bug in your own code that you need to fix. |