Closed Bug 37591 Opened 25 years ago Closed 25 years ago

nsHTMLFormElement within XUL leaked by nsGenericHTMLElement::SetParentForFormControls

Categories

(Core :: Layout: Form Controls, defect, P3)

x86
Linux
defect

Tracking

()

VERIFIED FIXED

People

(Reporter: dbaron, Assigned: pollmann)

Details

(Keywords: memory-leak)

DESCRIPTION: An nsHTMLInputElement within the chrome of Mozilla (perhaps the URL bar, but perhaps not, since it's one of about 4 that appear loading about:blank -- but it's the only one that even gets a non-null mForm, anyway) has SetParent(nsnull) called on it when it is destroyed, and this calls nsGenericHTMLElement::SetParentForFormControls, which calls SetForm(nsnull) on the nsHTMLInputElement. SetForm(nsnull) is the magic signal for the input element to forget about its form without releasing it. (I think it is intended to be used only by the form element itself.) I don't really understand what SetParentForFormControls is supposed to do, so I'm not sure how this leak should be fixed. STEPS TO REPRODUCE: * look at tinderbox leak logs or make similar ones ACTUAL RESULTS: * an nsHTMLFormElement is leaked (along with the stuff it owns)
Keywords: mlk
This may be fixed after I trace down a few leaks and check in the fixes for bug 36639. This would make SetForm(nsnull) act as any other SetForm(foo) - no references would be maintained between the elements and their forms.
reassigning - Eric, I'll let you have this one, if your work doesn't fix it, send it back
Assignee: rods → pollmann
This seems, from tinderbox, to have been fixed.
I agree, there are no nsHTMLFormElement's leaked according to the bloaty log on Tinderbox. (David, you probably even fixed this leak. :) ) Marking FIXED.
Status: NEW → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
Updating QA contact.
QA Contact: ckritzer → bsharma
verified on build 2001-08-14-trunk
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.