Closed
Bug 71324
Opened 24 years ago
Closed 24 years ago
memory leak in ime code
Categories
(Core :: Internationalization, defect)
Tracking
()
RESOLVED
FIXED
mozilla0.8.1
People
(Reporter: ftang, Assigned: ftang)
Details
(Keywords: inputmethod)
I think I find a memory leak in the ime code. In mozilla/content/events/src/nsDOMEvent.cpp, we allocate an array of nsIPrivateTextRange* and pass to new nsPrivateTextRangeList(((nsTextEvent* )aEvent)->rangeCount,tempTextRangeList); but in the mozilla/content/event/src/ nsPrivateTextRange.cpp nsPrivateTextRangeList::~nsPrivateTextRangeList we didn't delete the mList. This probably introdue small amout of memory leak. We should fix this. Here is the patch Index: mozilla/content/events/src/nsPrivateTextRange.cpp =================================================================== RCS file: /cvsroot/mozilla/content/events/src/nsPrivateTextRange.cpp,v retrieving revision 1.4 diff -u -5 -r1.4 nsPrivateTextRange.cpp --- nsPrivateTextRange.cpp 1999/12/21 19:27:39 1.4 +++ nsPrivateTextRange.cpp 2001/03/08 19:45:14 @@ -85,12 +85,15 @@ } nsPrivateTextRangeList::~nsPrivateTextRangeList(void) { int i; - for(i=0;i<mLength;i++) - mList[i]->Release(); + if(mList) { + for(i=0;i<mLength;i++) + mList[i]->Release(); + delete [] mList; + } } NS_IMPL_ISUPPORTS1(nsPrivateTextRangeList, nsIPrivateTextRangeList) NS_METHOD nsPrivateTextRangeList::GetLength(PRUint16* aLength)
Assignee | ||
Comment 1•24 years ago
|
||
r=nhotta jst , can you sr this ?
Status: NEW → ASSIGNED
Summary: memory leak in ime code → memory leak in ime code
Target Milestone: --- → mozilla0.8.1
Comment 2•24 years ago
|
||
Looks good to me, sr=jst
Assignee | ||
Comment 3•24 years ago
|
||
fix and check in .
Status: ASSIGNED → RESOLVED
Closed: 24 years ago
Resolution: --- → FIXED
Comment 4•23 years ago
|
||
Frank, can you include some steps how IQA can verify this bug or assign this bug to someone in engineering for verification?
reassigned QA to ftang for verification or to provide a test case for QA to verify
QA Contact: andreasb → ftang
Updated•14 years ago
|
Keywords: inputmethod
You need to log in
before you can comment on or make changes to this bug.
Description
•