This is the mail archive of the
gcc-bugs@gcc.gnu.org
mailing list for the GCC project.
[Bug libgcj/16134] Memory leak in String.getBytes()
- From: "mckinlay at redhat dot com" <gcc-bugzilla at gcc dot gnu dot org>
- To: gcc-bugs at gcc dot gnu dot org
- Date: 22 Jun 2004 16:56:33 -0000
- Subject: [Bug libgcj/16134] Memory leak in String.getBytes()
- References: <20040622101536.16134.hannes@helma.at>
- Reply-to: gcc-bugzilla at gcc dot gnu dot org
------- Additional Comments From mckinlay at redhat dot com 2004-06-22 16:56 -------
There is certainly a problem with the encoder cache here in that cache lookups
will always fail. I've written the obvious patch and will check it in shortly.
However the leak you see is not due to this code directly because it never keeps
more than 4 encoder instances in the cache. Rather, it is due to the
stack-walking code leaking memory as part of the calling classloader check in
Class.forName(). This was fixed in gcc 3.4, see bug 12475.
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=16134