Closed
Bug 33160
Opened 26 years ago
Closed 26 years ago
MLK: nsSplitterFrameInner leaks some data.
Categories
(Core :: XUL, defect, P2)
Core
XUL
Tracking
()
RESOLVED
FIXED
M16
People
(Reporter: bruce, Assigned: eric)
References
()
Details
(Keywords: memory-leak, Whiteboard: have fix awaiting checking)
Attachments
(2 files)
|
669 bytes,
patch
|
Details | Diff | Splinter Review | |
|
1.03 KB,
patch
|
Details | Diff | Splinter Review |
From beard's leak logs.
Appear to leak mChildInfosAfter and mChildInfosBefore.
malloc
operator new(unsigned long, const std::nothrow_t&)
operator new(unsigned long)
__nwa(unsigned long)
nsSplitterFrameInner::MouseDown(nsIDOMEvent*)
nsEventListenerManager::HandleEvent(nsIPresContext*, nsEvent*, nsIDOMEvent**,
unsigned int, nsEventStatus*)
nsXULElement::HandleDOMEvent(nsIPresContext*, nsEvent*, nsIDOMEvent**, unsigned
int, nsEventStatus*)
nsXULElement::HandleDOMEvent(nsIPresContext*, nsEvent*, nsIDOMEvent**, unsigned
int, nsEventStatus*)
PresShell::HandleEvent(nsIView*, nsGUIEvent*, nsEventStatus*, int&)
nsView::HandleEvent(nsGUIEvent*, unsigned int, nsEventStatus*, int&)
nsView::HandleEvent(nsGUIEvent*, unsigned int, nsEventStatus*, int&)
nsViewManager2::DispatchEvent(nsGUIEvent*, nsEventStatus*)
HandleEvent(nsGUIEvent*)
nsWindow::DispatchEvent(nsGUIEvent*, nsEventStatus&)
nsWindow::DispatchWindowEvent(nsGUIEvent&)
nsWindow::DispatchMouseEvent(nsMouseEvent&)
nsMacEventHandler::HandleMouseDownEvent(EventRecord&)
nsMacEventHandler::HandleOSEvent(EventRecord&)
nsMacWindow::HandleOSEvent(EventRecord&)
nsMacMessageSink::DispatchOSEvent(EventRecord&, GrafPort*)
nsMacMessagePump::DispatchOSEventToRaptor(EventRecord&, GrafPort*)
nsMacMessagePump::DoMouseDown(EventRecord&)
nsMacMessagePump::DispatchEvent(int, EventRecord*)
nsMacMessagePump::DoMessagePump()
nsAppShell::Run()
nsAppShellService::Run()
main1(int, char**, nsISplashScreen*)
main
__NSInitialize(1F1D7564)
Comment 1•26 years ago
|
||
I _think_ this might just be because we're not deleting with the right
operator. Patch attached, I'm interested in commentary from bruce and beard.
Comment 2•26 years ago
|
||
| Reporter | ||
Comment 3•26 years ago
|
||
I don't know anything about the mechanics behind beard's leak tools to tell
whether or not that is the problem. If anyone has a good idea on how to
reproduce this, preferably inside of viewer, I'd be happy to test.
Comment 4•26 years ago
|
||
While delete[] is always the right thing to do with arrays of objects, but the
real cause of this leak is that ~nsSplitterFrameInner() doesn't do the final
delete[], and your patch just fixes the case when mChildInfosBefore/After are
reallocated, if I understand the code correctly. So, we need some extra code
inserted into ~nsSplitterFrameInner() to do the final delete[].
Comment 5•26 years ago
|
||
Comment 6•26 years ago
|
||
Thanks guys, you rock! reassigning to evaughan for review/checkin.
Assignee: trudelle → evaughan
Priority: P3 → P2
Target Milestone: --- → M15
| Reporter | ||
Comment 7•26 years ago
|
||
To fix all of the FMM errors (delete vs delete[]), you'll also need to look at
the other uses of ChildInfos in the file, like, nsSplitterFrameInner::Reverse().
Looking at the file, that was the only other use that I saw.
| Assignee | ||
Comment 8•26 years ago
|
||
I have this change made in my current build. I'll land it soon with my box carpool.
Status: NEW → ASSIGNED
| Reporter | ||
Comment 9•26 years ago
|
||
Do you have an estimate of when that will happen so that I know when to watch
for it? Thanks!
| Assignee | ||
Comment 10•26 years ago
|
||
fixed
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → FIXED
Comment 11•26 years ago
|
||
The destructor fix wasn't in. I just added it.
| Reporter | ||
Comment 12•26 years ago
|
||
the problem with nsSplitterFrameInner::Reverse() wasn't fixed in the patch and
still remains in the tree. Reopening.
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Keywords: mlk
| Assignee | ||
Updated•26 years ago
|
Whiteboard: have fix awaiting checking
| Assignee | ||
Comment 14•26 years ago
|
||
fixed. Reverse now cleans itself up.
Status: REOPENED → RESOLVED
Closed: 26 years ago → 26 years ago
Resolution: --- → FIXED
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.
Description
•