Re: general performance question
- From: Lasse Reichstein Nielsen <lrn@xxxxxxxxxx>
- Date: Thu, 31 Jan 2008 07:01:33 +0100
Knute Johnson <nospam@xxxxxxxxxxxxxxxxxxxxxxx> writes:
Mike Schilling wrote:....
if (condition)
{
LargeObject lg = new LargeObject();
lg.doStuff()
// See discussion below
}
I don't think that is true. If you create an Object in a loop and
then reassign another Object to the same reference in the loop, the
first Object is eligible for garbage collection (and will be).
The previous poster didn't mention loops, merely a nested block
scope.
For a loop, the value set in the last iteration also leaks the
block.
/L
--
Lasse Reichstein Nielsen - lrn@xxxxxxxxxx
DHTML Death Colors: <URL:http://www.infimum.dk/HTML/rasterTriangleDOM.html>
'Faith without judgement merely degrades the spirit divine.'
.
- Follow-Ups:
- Re: general performance question
- From: Knute Johnson
- Re: general performance question
- References:
- general performance question
- From: Tobi
- Re: general performance question
- From: Matt Humphrey
- Re: general performance question
- From: Mike Schilling
- Re: general performance question
- From: Knute Johnson
- general performance question
- Prev by Date: Re: Java Socket Constructor
- Next by Date: Re: Java Socket Constructor
- Previous by thread: Re: general performance question
- Next by thread: Re: general performance question
- Index(es):
Relevant Pages
|