users@glassfish.java.net

Re: About memory leaks in GlassFish

From: <glassfish_at_javadesktop.org>
Date: Tue, 25 Aug 2009 09:32:58 PDT

Hello


I was looking to the patches you attached to issue #7600.
The erroneous code pattern looks to be:
1) new JarFile( ... )
2) no finally clause that closes the jarFile
3) keeping references to the entries of the jar somewhere

Is that right ?

Since the open() and close() methods of classes JarFile/ZipFile are native methods, is the condition 3) required ?
I mean if a jar file is opened when the JarFile constructor is invoked (unless specified otherwise), it is required to explicitly close it.
Correct or not ?


Bye
[Message sent by forum member 'vkoniecz' (vincent.konieczek_at_mpsa.com)]

http://forums.java.net/jive/thread.jspa?messageID=361878