Closed Bug 59393 Opened 24 years ago Closed 23 years ago

Atom leaks caused by COMPtr misuse...

Categories

(SeaMonkey :: General, defect, P3)

All
Windows NT
defect

Tracking

(Not tracked)

RESOLVED DUPLICATE of bug 59212

People

(Reporter: rpotts, Assigned: rpotts)

Details

The linkes below refer to files which incorrectly store the result from
NS_NewAtom(...) in a nsCOMPtr<nsIAtom> without using the dont_AddRef() or
getter_AddRefs() modifiers.  This causes the atom to leak.

http://lxr.mozilla.org/seamonkey/source/uriloader/exthandler/nsExternalHelperAppService.cpp#574
http://lxr.mozilla.org/seamonkey/source/mailnews/absync/src/nsAbSyncPostEngine.cpp#701
http://lxr.mozilla.org/seamonkey/source/xpfe/components/xfer/src/nsStreamTransfer.cpp#203
http://lxr.mozilla.org/seamonkey/source/xpfe/components/xfer/src/nsStreamTransfer.cpp#94
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenuItem.cpp#393
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenuItem.cpp#392
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenuItem.cpp#391
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenuItem.cpp#390
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenuItem.cpp#389
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenu.cpp#1461
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenu.cpp#1460
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenu.cpp#1459
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenu.cpp#1458
http://lxr.mozilla.org/seamonkey/source/widget/src/mac/nsMenu.cpp#1454
http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/nsMultiMixedConv.cpp#469
http://lxr.mozilla.org/seamonkey/source/netwerk/streamconv/converters/nsMultiMixedConv.cpp#219
http://lxr.mozilla.org/seamonkey/source/modules/plugin/nglsrc/nsPluginHostImpl.cpp#3470
http://lxr.mozilla.org/seamonkey/source/docshell/base/nsDocShell.cpp#3351
http://lxr.mozilla.org/seamonkey/source/xpfe/components/ucth/src/nsUnknownContentTypeHandler.cpp#105
nice catch! are you going to clean these up, or do you want module owners to do so?
I'll create the patches for each file...  I'll just need some reviews :-)

-- rick
This bug seems like a duplicate of bug 59212.  The solution of making NS_NewAtom
return already_AddRefed<nsIAtom> seems to work.
I'm marking this bug as a dup of bug #59212 - since it outlines the same work :-)


*** This bug has been marked as a duplicate of 59212 ***
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → DUPLICATE
Product: Browser → Seamonkey
You need to log in before you can comment on or make changes to this bug.