Closed Bug 296713 Opened 20 years ago Closed 20 years ago

XForms is leaking control elements

Categories

(Core Graveyard :: XForms, defect)

x86
Linux
defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

Details

Attachments

(1 file, 1 obsolete file)

patch coming.
Assignee: aaronr → smaug
Status: NEW → ASSIGNED
Attached patch v.1 (obsolete) — Splinter Review
We should not hold a strong ref to the mElement.
I added also some DEBUG_smaug code to see whether we are still leaking.
Note, when using that debug code, some non-xforms pages have to be loaded
after xforms pages, so that xforms documents are GC'd.

I'm not too happy with the hack in the <select> but that is needed the prevent
leaks.
Attachment #185413 - Flags: review?(allan)
Comment on attachment 185413 [details] [diff] [review]
v.1

>Index: nsXFormsControlStub.cpp
>===================================================================
>+  ControlDebug() {
>+    sControlList = new nsVoidArray();
>+  }

Add assertion for null return.

>Index: nsXFormsSelectElement.cpp
>===================================================================
>+  // XXX This is needed to fix memory leaks.
>+  RemoveChildren(mSelect);

Why is that?

You need to document RemoveChildren and/or the call. And why is this an XXX?
Attached patch v2Splinter Review
Attachment #185413 - Attachment is obsolete: true
Attachment #185484 - Flags: review?(allan)
Attachment #185413 - Flags: review?(allan)
Attachment #185484 - Flags: review?(aaronr)
Attachment #185484 - Flags: review?(allan) → review+
Attachment #185484 - Flags: review?(aaronr) → review+
Checked in.
Status: ASSIGNED → RESOLVED
Closed: 20 years ago
Resolution: --- → FIXED
Product: Core → Core Graveyard
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: