If you open and close a composer window (no typing required), we leak a bunch of stuff, including the nsEditor, nsEditorShell, nsEditorBoxObject, 2 nsJSContexts and perhaps more. This causes other teardown-related bugs (e.g. bug 41681).
We're leaking an nsXULDocument here
*** Bug 41681 has been marked as a duplicate of this bug. ***
Status on this one: If I remove the <editor> tag from the XUL, we stop leaking. If I never make an editor in the C++, then we still leak.
Well, this was fun. It turns out to be a bug deep in XBL/JS, which I've filed separately (bug 42746). I can fix this by checking in a workaround.
I checked in a 1-line JS change that fixed the XUL doc leak. We still leak the editorshell, which is shown in the log just attached.
Tony, this one is all yours. FYI, here's an email which waterson sent out which relates to this bug: David Baron has done a heroic job of tracking down and documenting a plethora of leaks that involve XUL, JS, XBL, boxes, and editor. For that, he certainly deserves a *ton* of credit. But that's not why I'm writing this message. I'm starting to get really, really nervous about the state of this code. I think that a lot of stuff is just leaking all over the floor. And I mean, really nasty, hard leaks that involve cycles between frames, content nodes, and their JS objects. (For example, look at http://bugzilla.mozilla.org/show_bug.cgi?id=45676.) These leaks involve massive amounts of memory. For example, let's take bug 45676. Just *using* a scrollbar (imagine that) entrains over 1Mb (the entire window)! Realistically, this means that we're leaking almost every window that we open. I realize that people on XPToolkit are already doomed, but this stuff has *got* to be made a priority. It has tremendous impact on performance and footprint, and ultimately affects the stability of the product on Win98, Mac, and embedded platforms. Is there any hope that dbaron can get some help looking at this stuff? thanks, chris
Ugh, sorry for the spam. m18.
Anthony -- pull in SImon if you need help with this one, setting to nsbeta3+
setting priority in status whiteboard - medium
moving this over to m19 with other perf issues
bumping up to p2, setting to nsbeta3+ -- reviewed by Bijal and beppe
pdtp3. There is nothing in this bug that describes the horrible impact of not fixing it. If you can show that fixing this would provide some huge benefit, please bring it back for reconsideration.
This bug is fixed anyway.
Marking verified per last comments by reporter.