james-server-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From j...@apache.org
Subject [jira] Commented: (JAMES-248) memory management - finalize/nullify after successful delivery of retrieved MailImpl
Date Thu, 08 Apr 2004 15:54:43 GMT
The following comment has been added to this issue:

     Author: Noel J. Bergman
    Created: Thu, 8 Apr 2004 8:53 AM
Java does not guarantee that finalizers run, and it certainly does not guarantee that they
will run before Java decides to garbage collect that object.

Another approach to cleanup is the use of PhantomReference objects.  We may adopt that approach
into James, but temporary files in James, created by MimeMessageInputSource, are cleaned up
during normal operation as you could see by watching the temp/ directory.  I cannot speak
for whatever is done in your code.

Do you have any reason to believe that there is currently a problem in James?
View this comment:

View the issue:

Here is an overview of the issue:
        Key: JAMES-248
    Summary: memory management - finalize/nullify after successful delivery of retrieved MailImpl
       Type: Improvement

     Status: Unassigned
   Priority: Major

    Project: James

   Reporter: Ralf Hauser

    Created: Mon, 5 Apr 2004 11:54 AM
    Updated: Thu, 8 Apr 2004 8:53 AM
Environment: Redhat 9

My application required an adaptation of the MailRepository.retrieve() method.
It creates a temporary object on disk and I provided it with a finalize() method for cleaning

The interesting thing is that this finalize is not executed until I shut-down james.
This leads me to the conclusion that even if there was no ties to a disk operation the 
remains in memory long after the MUA has disconnected.

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

This message is automatically generated by JIRA.

If you think it was sent incorrectly contact one of the administrators:

If you want more information on JIRA, or have a bug to report see:

To unsubscribe, e-mail: server-dev-unsubscribe@james.apache.org
For additional commands, e-mail: server-dev-help@james.apache.org

View raw message