struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balazs Michnay <>
Subject Re: [OT] Serious memory leak
Date Mon, 25 Jun 2007 06:41:19 GMT
I was wondering about one more thing...
Somewhere I read that the GC can only collect objects that were instantiated with the "new"
Does it mean the the following two String creations differ when it comes to garbage collection?

1) String myString = "This is my string";
2) String myString = new String("This is my string");

If the second one can only be garbage collected, this would explain my uncollectable char[]
objects, because mostly I simply use the 1) version.
If you say this really does count when it comes to garbage collection, I'd rewrite my code
and see what happens.

Thanks a lot,


----- Original Message ----
From: Christopher Schultz <>
To: Struts Users Mailing List <>
Sent: Wednesday, June 20, 2007 2:29:29 PM
Subject: Re: [OT] Serious memory leak

Hash: SHA1


Balazs Michnay wrote:
> Thanks a lot, these changes really did help, now MySQL reports that
> only one connection is used all over the website. I really do
> appreciate your help.

No problem. Another good tip is to set your connection pool size to 1
when working in development (and maybe even test). This will allow your
connection pool to be exhausted any time there is a potential for
deadlock (from the cp, that is).

Good luck,
- -chris

Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla -


To unsubscribe, e-mail:
For additional commands, e-mail:

The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message