JAVA/CORBA CLASSES


recycle method
The recycle method unconditionally destroys an object and returns its memory to the system.

All lotus.domino classes contain the following methods:


In the latter method, the vector contains the Domino Objects to be recycled. This method effectively batches recycle operations and is especially efficient for remote (IIOP) calls.

Java has no knowlege of the heavyweight back-end Domino Objects, only the lightweight Java objects representing them. Garbage collection has no effect on Domino Objects unless you first explicitly recycle them.

If you appear to have memory problems, try recycle but adhere to the following guidelines:


Loops enumerating documents or items are good candidates for recycling.

In a remote (IIOP) environment, recycle releases resources on the server. Although a client-side cache exists, the Java object can no longer communicate with its remote counterpart.

In a remote (IIOP) environment, recycle can be called from any thread on any object.

If you create more than one object to represent the same Domino element, recycling one recycles all. For example:


Results are undefined if you attempt to use a recycled object. No error is guaranteed.

See Also