[Top][All Lists]
[Date Prev][Date Next][Thread Prev][Thread Next][Date Index][Thread Index]
[Bug swing/26368] Possible memory leak in GapContent
From: |
cvs-commit at developer dot classpath dot org |
Subject: |
[Bug swing/26368] Possible memory leak in GapContent |
Date: |
18 May 2006 14:22:47 -0000 |
------- Comment #4 from cvs-commit at developer dot classpath dot org
2006-05-18 14:22 -------
Subject: Bug 26368
CVSROOT: /cvsroot/classpath
Module name: classpath
Branch:
Changes by: Roman Kennke <address@hidden> 06/05/18
14:16:11
Modified files:
javax/swing/text: GapContent.java
. : ChangeLog
Log message:
2006-05-18 Roman Kennke <address@hidden>
PR 26368
* javax/swing/text/GapContent.java
(GapContentPosition(int)): Use adapted binarySearch method to
allow for having a greater array than number of entries.
(numMarks): New field, holds the end of the marks list.
(GapContent): Initialize positionMarks with size of 10 instead of 0.
(shiftGapStartDown): Adjusted for new setPositionsInRange signature.
(shiftGapEndUp): Adjusted for new setPositionsInRange signature.
(setPositionsInRange): Changed signature to narrow the purpose and
special cases inside. Reimplemented to crunch together equal marks.
(adjustPositionsInRange): Added assertion to make sure we do
not accidentally change the order of the mark. Added some debug
output for a special case of which I don't know if it even exists.
(resetMarksAtZero): Made impl simpler.
(dumpMarks): New debug helper method.
(insertMark): Grow array in bigger chunks to avoid excessive copying.
(binarySearch): New method. An adaption of Arrays.binarySearch()
that allows for an maxIndex parameter.
CVSWeb URLs:
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/javax/swing/text/GapContent.java.diff?tr1=1.47&tr2=1.48&r1=text&r2=text
http://cvs.savannah.gnu.org/viewcvs/classpath/classpath/ChangeLog.diff?tr1=1.7469&tr2=1.7470&r1=text&r2=text
--
http://gcc.gnu.org/bugzilla/show_bug.cgi?id=26368