ant-dev mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From bugzi...@apache.org
Subject DO NOT REPLY [Bug 37169] - SQLExec.runStatements causes problems for JDK 1.5
Date Fri, 21 Oct 2005 16:05:36 GMT
DO NOT REPLY TO THIS EMAIL, BUT PLEASE POST YOUR BUG·
RELATED COMMENTS THROUGH THE WEB INTERFACE AVAILABLE AT
<http://issues.apache.org/bugzilla/show_bug.cgi?id=37169>.
ANY REPLY MADE TO THIS MESSAGE WILL NOT BE COLLECTED AND·
INSERTED IN THE BUG DATABASE.

http://issues.apache.org/bugzilla/show_bug.cgi?id=37169





------- Additional Comments From sbailliez@apache.org  2005-10-21 18:05 -------
Actually to be more accurate the 'good optimization' is actually a trade-off 
as this can lead to major memory usage if you are reusing a StringBuffer and 
reusing it via setLength(0).

The reason is that when the char array is not shared anymore and only belongs 
to the String object..u could actually be sharing an allocated 1000000 char 
array when the string is actually made of only 1 char in this char array.

Do that over a loop and you could very easily  get the gc crawling and end up 
with in an OOME

-- 
Configure bugmail: http://issues.apache.org/bugzilla/userprefs.cgi?tab=email
------- You are receiving this mail because: -------
You are the assignee for the bug, or are watching the assignee.

---------------------------------------------------------------------
To unsubscribe, e-mail: dev-unsubscribe@ant.apache.org
For additional commands, e-mail: dev-help@ant.apache.org


Mime
View raw message