james-mime4j-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Oleg Kalnichevski <ol...@apache.org>
Subject Re: Message.dispose()
Date Sat, 14 Jan 2012 12:30:29 GMT
On Thu, 2012-01-12 at 14:42 -0600, Robert_E_Lee@Dell.com wrote:
> After reading the comments in MIME4J-72, it is still unclear how this ended up being
implemented, and what users of the API need to do to clean up resources.
> So my question is: Do I need to manually traverse the message and dispose of every disposable
object in the message, or only call dispose on the outermost message object itself? Another
words, if I call Message.dispose(), does that recursively clean up all of its constituent
objects, or must I do that?
> Thanks,
> Rob L
> Robert Lee
> Software Engineer
> Dell | Services Product Group
> 2401 Greenlawn Blvd.
> Mailstop RR 7 - 29
> Round Rock, TX 78682
> Direct: (512) 513-5916

Since no one else responded so far, here's my take. Message#dispose must
also ensure deallocation of resources held by child objects. So,
effectively parent is expected to traverse its children and invoke
#dispose method on objects being traversed. If this is not the case,
please raise a JIRA for the defect.


View raw message