Closed Bug 43582 Opened 26 years ago Closed 26 years ago

2 nsBoxLayout held past XPCOM shutdown in static nsCOMPtrs

Categories

(Core :: XUL, defect, P3)

defect

Tracking

()

RESOLVED FIXED
mozilla0.9

People

(Reporter: dbaron, Assigned: dbaron)

References

Details

(Keywords: embed, memory-leak, topembed+, Whiteboard: [tind-mlk][nsbeta3-])

Attachments

(1 file)

The two "static nsCOMPtr<nsIBoxLayout> gInstance" in layout/xul/base/src/ns{Sprocket,Stack}Layout.h are created before XPCOM is initialized and destroyed after XPCOM shutdown. See: http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsSprocketLayout.h#1 64 http://lxr.mozilla.org/seamonkey/source/layout/xul/base/src/nsStackLayout.h#53 This leaks 2 nsBoxLayout.
again, this is eric's.
Assignee: trudelle → evaughan
Whiteboard: [tind-mlk]
Blocks: 38671
mass-moving all evaughan non-nsbeta3+ bugs to 'Future' milestone (per trudelle).
Target Milestone: --- → Future
Come on. This is a MEMORY LEAK. Lets try to fix it at least. I'll look at it if you guys won't. :P
nsbeta3 -- this kind of thing gets in the way of seeing other leaks
Keywords: nsbeta3
Target Milestone: Future → M19
maybe these statics can be turned into raw iface pointers and released from some service shutdown that can scope the lifetime of these ptrs?
Quite easy to fix. But its not beta3+ unfortunately. :(
Status: NEW → ASSIGNED
This will greatly help the embedding memory issues which fall under "major client requirements".
Keywords: embed
What is the size/frequency of the leak?
It is a shutdown leak. I am not sure how much memory each nsBoxLayout hold on to. This is low-hanging fruit and should be fixed so that we can get better numbers on real leaks.
With 10 days to go, a one-time leak of unknown size at shutdown does not fit the profile for bugs we should be spending any time on. We are not prioritizing based on ease of fixing; if we were then we'd be fixing a huge number of bugs that don't really matter. If this is a large leak that is not returned to the system once we have shutdown, then I'd still like to hear the size, but otherwise ->nsbeta3-/future.
Whiteboard: [tind-mlk] → [tind-mlk][nsbeta3-]
Target Milestone: M19 → Future
The patch above fixes this bug and bug 43588. (I have some other changes in nsLayoutModule.cpp too.) I need to *add* to that patch makefile changes for Windows and mac project changes. evaughan - How does that patch look? I'm taking this bug since I have a fix pending review.
Assignee: evaughan → dbaron
Status: ASSIGNED → NEW
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9
Looks good. r=evaughan
How about adding MOZ_COUNT_CTOR/DTOR while you are at it? /be
brendan: Adding MOZ_COUNT_CTOR/MOZ_COUNT_DTOR to what? (I'm generally pretty agressive about adding them when I see something that's not counted, but I don't see anything uncounted here.)
+nsBulletinBoardLayout::nsBulletinBoardLayout() +{ +} Singleton, but still worth counting? /be
nsBulletinBoardLayout is a subclass of nsBoxLayout, which gets logging from NS_IMPL_ADDREF and NS_IMPL_RELEASE. That's the only reason I knew this leak existed.
Fix checked in 2000-11-07 19:20 and 19:22 PDT.
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Keywords: topembed+
Component: XP Toolkit/Widgets: XUL → XUL
QA Contact: jrgmorrison → xptoolkit.widgets
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: