logo

New Response

« Return to the blog entry

You are replying to:

  1. What Gernot said is correct. The recycle() method is peculiar to Domino and is not part of Java.

    To expand a bit, I think Domino calls recycle() automatically when an agent exits. So if you're not looping in the code you likely don't have to worry about it.

    But if you are looping within the Java code and creating objects on each loop, each of which is going to consume memory, then you may consume all available memory before the agent exits.

    This has happened to me when processing many documents from a view. For instance I've written agents to make one-time changes to tens of thousands of documents when adding new features or fixing a bug.

    In those cases I have to call recycle() on each document object once it's saved or the agent will crash before finishing all the documents.

    As a result, I try to add the recycle() call in all the code I write in case it might end up being reused in just such a situation.

Your Comments

Name:
E-mail:
(optional)
Website:
(optional)
Comment: