Closed Bug 398940 Opened 18 years ago Closed 18 years ago

leak GTK window groups in nsWindow::NativeCreate

Categories

(Core :: Widget: Gtk, defect)

x86
Linux
defect
Not set
normal

Tracking

()

RESOLVED FIXED

People

(Reporter: dbaron, Unassigned)

References

Details

(Keywords: memory-leak)

Attachments

(1 file)

Attached patch patchSplinter Review
We leak GTK window groups in one of the codepaths in nsWindow::NativeCreate. In some of the code paths we use window groups from existing windows, but in one, we create a new window group. When we create this window group, we leak it. The easy solution is to reference count mWindowGroup. Note that this makes the patch a tiny bit confusing, since it therefore changes every codepath **except** the one where we currently leak -- since the gtk_window_group_new call here already returns us a reference: http://bonsai.mozilla.org/cvsblame.cgi?file=/mozilla/widget/src/gtk2/nsWindow.cpp&rev=1.229&mark=2928#2922
Attachment #283938 - Flags: superreview?(roc)
Attachment #283938 - Flags: review?(roc)
Attachment #283938 - Flags: superreview?(roc)
Attachment #283938 - Flags: superreview+
Attachment #283938 - Flags: review?(roc)
Attachment #283938 - Flags: review+
Attachment #283938 - Flags: approval1.9+
Checked in to trunk.
Status: NEW → RESOLVED
Closed: 18 years ago
Resolution: --- → FIXED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: