users@glassfish.java.net

Re: Jsr199JavaCompiler possible memory leak?

From: <glassfish_at_javadesktop.org>
Date: Thu, 15 Jan 2009 12:42:56 PST

You are right again, about the need to override equals method.

Instead of doing the work in your patch, I think it may be cleaner if we use a HashSet or HashMap instead of ArrayList. That way we can be sure that there is only one copy of the compiled bytecode. We can use the class name for the keys to the HashMap. That way we don't even need to override equals method.

What do you think? Thanks.
[Message sent by forum member 'kchung' (kchung)]

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