The original issue <http://issues.apache.org/jira/browse/JAMES-248> says:

"Isn't this kind of a memory leak? After all, attachments to such a MIMEMessage can be 13MB large.
Shouldn't those objects be null-ed latest after the POP3Handler.doQUIT of a session?"


Commenting upon this, Noel wisely asks "Do you have any reason to believe that there is currently a problem in James?"

I guess that this IS NOT a kind of memory leak. The people who specified the JVM seem to believe that they have the JVM's memory managment under control, and they seem to want us Java developers to leave that problem to them. Generally, I trust the JVM to do garbage collection using parameters which are known to the JVM.

Generally, all you need to do with a variable name when you are done with it is to forget it. Just let it fall out of scope, while making sure of course that your scope is not larger than needed.

When I see variables set to null after their use, I think that this programmer does not know Java.

Rich Hammer


--------------------------------------------------------------------- To unsubscribe, e-mail: [EMAIL PROTECTED] For additional commands, e-mail: [EMAIL PROTECTED]



Reply via email to