Closed
Bug 25767
Opened 25 years ago
Closed 25 years ago
[MLK] Leaking DeleteTextTxn objects
Categories
(Core :: DOM: Editor, defect, P2)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
M14
People
(Reporter: beard, Assigned: buster)
References
()
Details
In the URL above, you'll note you are creating DeleteTextTxn objects. You need to add an NS_RELEASE after appending the txn on line 242, or it leaks. The same holds true below on line 268. Here's a patch to fix these leaks: Index: mozilla/editor/base/DeleteRangeTxn.cpp =================================================================== RCS file: /cvsroot/mozilla/editor/base/DeleteRangeTxn.cpp,v retrieving revision 1.46 diff -c -2 -r1.46 DeleteRangeTxn.cpp *** DeleteRangeTxn.cpp 2000/01/11 20:47:36 1.46 --- DeleteRangeTxn.cpp 2000/01/30 18:41:20 *************** *** 241,244 **** --- 241,245 ---- txn->Init(mEditor, textNode, aStartOffset, numToDel); AppendChild(txn); + NS_RELEASE(txn); } else *************** *** 267,270 **** --- 268,272 ---- txn->Init(child); AppendChild(txn); + NS_RELEASE(txn); } }
mem leak M14 P2
Status: NEW → ASSIGNED
Priority: P3 → P2
Target Milestone: M14
I've applied your patch. Can I simply mark you down as the reviewer, patrick? thanks for the patch!
Reporter | ||
Comment 3•25 years ago
|
||
r=beard
fix checked in.
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Comment hidden (collapsed) |
You need to log in
before you can comment on or make changes to this bug.
Description
•