db-derby-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From Knut Anders Hatlen <Knut.Hat...@Sun.COM>
Subject Nulling out variables for GC (was: Re: svn commit: r510963 ...)
Date Fri, 23 Feb 2007 15:21:01 GMT
djd@apache.org writes:

>  		if ((pageData == null) || (pageData.length != pageSize)) 
>          {
> +            // Give a chance for gc to release the old buffer
> +            pageData = null; 
>  			pageData = new byte[pageSize];

Out of curiosity (I have seen similar code changes go in before), why
does pageData need to be set to null to be garbage collected? Is this
a workaround for a bug on a certain JVM? If so, it would be good to
document it in a comment.

-- 
Knut Anders

Mime
View raw message