leak an nsGTKToolkit in nsAppRunner; nsIWidget::GetToolkit should not AddRef

RESOLVED FIXED

Status

()

RESOLVED FIXED
11 years ago
11 years ago

People

(Reporter: dbaron, Assigned: dbaron)

Tracking

({memory-leak})

Trunk
x86
Linux
memory-leak
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

Attachments

(1 attachment)

We leak the singleton nsGTKToolkit in toolkit/xre/nsAppRunner.cpp because the caller isn't expecting nsIWidget::GetToolkit to AddRef, which it does.  Probably the best solution is to make nsIWidget::GetToolkit not AddRef.

Comment 1

11 years ago
which one leaks? the second call or the first? 
Assignee: nobody → dbaron
XRE_main (.../mozilla/toolkit/xre/nsAppRunner.cpp:2721)
GetGTKToolkit (.../mozilla/toolkit/xre/nsAppRunner.cpp:2151)
nsBaseWidget::GetToolkit() (.../mozilla/widget/src/xpwidgets/nsBaseWidget.cpp:644)
nsGTKToolkit::AddRef() (.../mozilla/widget/src/gtk2/nsToolkit.cpp:82)
Created attachment 270291 [details] [diff] [review]
make nsIWidget::GetToolkit not AddRef
Attachment #270291 - Flags: superreview?(roc)
Attachment #270291 - Flags: review?(roc)
Attachment #270291 - Flags: superreview?(roc)
Attachment #270291 - Flags: superreview+
Attachment #270291 - Flags: review?(roc)
Attachment #270291 - Flags: review+
Checked in to trunk.
Status: NEW → RESOLVED
Last Resolved: 11 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.