Sunday, February 18, 2007

Difference between “garbage collector” in Lotus Notes/Domino and Java

As you know, when you work with Lotus Notes/Domino as developer, you never think about deleting objects. I mean, when you create a new NotesDocument you never delete it because Lotus Notes/Domino do it automatically. It’s really good feature if you work with Lotus Script, but when you write on Java, for example, Agent on java, you must always use method recycle() for memory release. I want admit, when you call method recycle() for object_A, then method recycle() automatically call for any objects that are created from object_A. It means that calling recycle() on a database object will also do recycle() for all objects obtained through this database.

It is important to remember that only one reason for calling recycle() is to release memory when you write an on java.

No comments :