When using an nsCOMPtr<nsILineBreaker>, simply assigning to it causes another AddRef() to be called on the interface being assigned. However, the line above returns an object which already has a refCount of 1, so the object leaks. The fix is as follows: Index: mozilla/rdf/content/src/nsXULDocument.cpp =================================================================== RCS file: /cvsroot/mozilla/rdf/content/src/nsXULDocument.cpp,v retrieving revision 1.204 diff -r1.204 nsXULDocument.cpp 722c722 < mLineBreaker = lb; --- > mLineBreaker = dont_AddRef(lb);
same for word breaker I copy the code from layout/base/src/nsDocument.cpp . howerver, in there, the pointer is not nsCOMPtr so we should only fix this place.
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED
fix and check in.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.