Why all the talk about recycle() – how about dispose()?

Let me start by saying that I agree that recycle() could and should be handled by the API and there are numerous ways around it. I however also think that the majority of Notes developers out there will never have the need to call recycle() in their Java agents. There is a lot of talk about recycle() this and recycle() that but let’s face it – it’s not really a problem. If ever there is a problem with the Java API it’s not recycle() it is the fact that it has been left to stagnate and that it’s not keeping up with the Java language as a whole.

All this being said I wonder why so much talk and energy is being spent on recycle() and how come it is constantly being used as a reason not to move to Java and embrace the language. Looking at other API’s there are stuff that needs to be done. In the Java API it’s recycle() (whenever it’s actually needed) and in SWT it’s dispose(). I never see any SWT discussions on the dispose() method and DisposeListeners and using it as a justification for not choosing SWT and Eclipse as the fundation for an application. You judge a framework on what it does for you and not a single method in an API. Every API and language has quirks. Deal with it!

My post from 2006 (!!) has a lot more information on recycle() and why it’s there: Java in Notes/Domino Explained: The story on recycle()