struts-user mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Balazs Michnay <sztg.sze...@yahoo.com>
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"
keyword.
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,

  MB.

----- Original Message ----
From: Christopher Schultz <chris@christopherschultz.net>
To: Struts Users Mailing List <user@struts.apache.org>
Sent: Wednesday, June 20, 2007 2:29:29 PM
Subject: Re: [OT] Serious memory leak

-----BEGIN PGP SIGNED MESSAGE-----
Hash: SHA1

Balazs,

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

-----BEGIN PGP SIGNATURE-----
Version: GnuPG v1.4.7 (MingW32)
Comment: Using GnuPG with Mozilla - http://enigmail.mozdev.org

iD8DBQFGeR2o9CaO5/Lv0PARAspgAJ4yMYS06yOQ5CLE29ezyf1D5oaLhQCfWXuu
GHdfh1DPw+q/1WXEByma8L4=
=8bHg
-----END PGP SIGNATURE-----

---------------------------------------------------------------------
To unsubscribe, e-mail: user-unsubscribe@struts.apache.org
For additional commands, e-mail: user-help@struts.apache.org








 
____________________________________________________________________________________
The fish are biting. 
Get more visitors on your site using Yahoo! Search Marketing.
http://searchmarketing.yahoo.com/arp/sponsoredsearch_v2.php
Mime
  • Unnamed multipart/alternative (inline, None, 0 bytes)
View raw message