Closed Bug 375320 Opened 17 years ago Closed 17 years ago

XForms leaks

Categories

(Core Graveyard :: XForms, defect)

defect
Not set
normal

Tracking

(Not tracked)

RESOLVED FIXED

People

(Reporter: smaug, Assigned: smaug)

References

Details

(Keywords: fixed1.8.0.12, fixed1.8.1.4)

Attachments

(1 file)

Attached patch possible patchSplinter Review
Load https://bugzilla.mozilla.org/attachment.cgi?id=259377
and you'll see some leaks.

I think we can clear most things when unload event is handled.
The changes to nsXFormsControlListItem::FindControl are needed because
mControlListHash->Get addrefs.
http://lxr.mozilla.org/seamonkey/source/xpcom/glue/nsRefPtrHashtable.h#63
Attachment #259629 - Flags: review?(aaronr)
Comment on attachment 259629 [details] [diff] [review]
possible patch

Excellent catch Olli!

We already do most of the clearing that you added to HandleUnload during OnDestroyed.  I see the value in doing the clearing earlier and that we still need the code in OnDestroyed in case the model is removed from the document prior to unload being fired (i.e. due to DOM manipulation), but you should comment the changes in HandleUnload to make that clear why we are clearing that information here as well as OnDestroyed so someone won't think that we accidentally duplicated the code and remove it later.

with that, r=me
Attachment #259629 - Flags: review?(aaronr) → review+
Comment on attachment 259629 [details] [diff] [review]
possible patch

I'll add that comment.
Attachment #259629 - Flags: review?(doronr)
Blocks: 353738
Attachment #259629 - Flags: review?(doronr) → review+
Status: NEW → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: xf-to-branch
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee: xforms → Olli.Pettay
Status: REOPENED → NEW
Status: NEW → RESOLVED
Closed: 17 years ago17 years ago
Resolution: --- → FIXED
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16
Whiteboard: xf-to-branch
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: