Last Comment Bug 375320 - XForms leaks
: XForms leaks
Status: RESOLVED FIXED
: fixed1.8.0.12, fixed1.8.1.4
Product: Core Graveyard
Classification: Graveyard
Component: XForms (show other bugs)
: Trunk
: All All
: -- normal (vote)
: ---
Assigned To: Olli Pettay [:smaug]
: Stephen Pride
Mentors:
Depends on:
Blocks: 353738
  Show dependency treegraph
 
Reported: 2007-03-25 14:51 PDT by Olli Pettay [:smaug]
Modified: 2016-07-15 14:46 PDT (History)
1 user (show)
See Also:
QA Whiteboard:
Iteration: ---
Points: ---


Attachments
possible patch (1.87 KB, patch)
2007-03-25 14:51 PDT, Olli Pettay [:smaug]
aaronr: review+
doronr: review+
Details | Diff | Splinter Review

Description Olli Pettay [:smaug] 2007-03-25 14:51:13 PDT
Created attachment 259629 [details] [diff] [review]
possible patch

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
Comment 1 aaronr 2007-03-26 12:18:08 PDT
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
Comment 2 Olli Pettay [:smaug] 2007-03-26 12:22:27 PDT
Comment on attachment 259629 [details] [diff] [review]
possible patch

I'll add that comment.
Comment 3 aaronr 2007-04-23 16:27:24 PDT
checked into 1.8 branch on 2007-04-12
checked into 1.8.0 branch on 2007-04-16

Note You need to log in before you can comment on or make changes to this bug.