Closed
Bug 10178
Opened 26 years ago
Closed 26 years ago
[MLK] Potential leak of 17160 bytes - in NS_NewRDFElement
Categories
(Core Graveyard :: RDF, defect, P3)
Core Graveyard
RDF
Tracking
(Not tracked)
M12
People
(Reporter: skasinathan, Assigned: waterson)
References
Details
There are lot of Memory Leaks occuring in NS_NewRDFElement. This leak is
occuring for the past few weeks. I usually run Purify once/twice every week and
my results are posted at http://www.mozilla.org/mailnews/purify/.
The stack trace is as follows.
[I] MPK: Potential memory leak of 17160 bytes from 195 blocks allocated in
NS_NewRDFElement(int,nsIAtom *,nsIContent * *)
Distribution of potentially leaked blocks
17160 bytes from 195 blocks of 88 bytes (first block: 0x0645dad8)
allocation number 215733
Allocation location
new(UINT) [new.cpp:23]
NS_NewRDFElement(int,nsIAtom *,nsIContent * *) [nsRDFElement.cpp:473]
return NS_ERROR_NULL_POINTER;
RDFElementImpl* element =
=> new RDFElementImpl(aNameSpaceId, aTag);
if (! element)
return NS_ERROR_OUT_OF_MEMORY;
RDFXULBuilderImpl::CreateXULElement(nsINameSpace *,nsIRDFResource
*,int,nsIAtom *,nsIContent * *) [nsRDFXULBuilder.cpp:2611]
// Create a new XUL element.
nsCOMPtr<nsIContent> element;
=> rv = NS_NewRDFElement(aNameSpaceID, aTagName,
getter_AddRefs(element));
NS_ASSERTION(NS_SUCCEEDED(rv), "unable to create new content
element");
if (NS_FAILED(rv)) return rv;
RDFXULBuilderImpl::CreateElement(int,nsIAtom *,nsIRDFResource
*,nsIContent * *) [nsRDFXULBuilder.cpp:946]
rv = CreateHTMLElement(nsnull, resource, aTagName,
getter_AddRefs(result));
}
else {
=> rv = CreateXULElement(nsnull, resource, aNameSpaceID,
aTagName, getter_AddRefs(result));
}
if (NS_FAILED(rv)) return rv;
XULDocumentImpl::CreateElement(nsString const&,nsIDOMElement * *)
[nsXULDocument.cpp:2735]
}
nsCOMPtr<nsIContent> result;
=> rv = mXULBuilder->CreateElement(nameSpaceID, name, nsnull,
getter_AddRefs(result));
if (NS_FAILED(rv)) return rv;
// get the DOM interface
nsSliderFrame::CreateAnonymousContent(nsISupportsArray&)
[nsSliderFrame.cpp:96]
// create a thumb
nsCOMPtr<nsIDOMElement> node;
=> document->CreateElement("thumb",getter_AddRefs(node));
nsCOMPtr<nsIContent> content;
content = do_QueryInterface(node);
nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresContext *,nsIAtom
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,nsFrameItems&)
[nsCSSFrameConstructor.cpp:2794]
nsCOMPtr<nsISupportsArray> anonymousItems;
NS_NewISupportsArray(getter_AddRefs(anonymousItems));
=> creator->CreateAnonymousContent(*anonymousItems);
PRUint32 count = 0;
anonymousItems->Count(&count);
nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,nsIAtom *,nsIStyleContext
*,nsFrameItems&,int&) [nsCSSFrameConstructor.cpp:3163]
// if there are any anonymous children create frames for them
CreateAnonymousFrames(aPresContext, aTag, aState, aContent,
newFrame,
=> childItems);
// Set the frame's initial child list
newFrame->SetInitialChildList(*aPresContext, nsnull,
childItems.childList);
nsCSSFrameConstructor::ConstructFrame(nsIPresContext
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,int,nsFrameItems&)
[nsCSSFrameConstructor.cpp:3820]
(lastChild == aFrameItems.lastChild))) {
PRBool haltProcessing = PR_FALSE;
rv = ConstructXULFrame(aPresContext, aState, aContent,
aParentFrame,
=> tag, styleContext, aFrameItems,
haltProcessing);
if (haltProcessing) {
return rv;
}
nsCSSFrameConstructor::CreateAnonymousFrames(nsIPresContext *,nsIAtom
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,nsFrameItems&)
[nsCSSFrameConstructor.cpp:2811]
content->SetDocument(doc, PR_TRUE);
// create the frame and attach it to our frame
=> ConstructFrame(aPresContext, aState, content, aNewFrame, PR_FALSE,
aChildItems);
}
#ifdef XP_MENUS
nsCSSFrameConstructor::ConstructXULFrame(nsIPresContext
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,nsIAtom *,nsIStyleContext
*,nsFrameItems&,int&) [nsCSSFrameConstructor.cpp:3163]
// if there are any anonymous children create frames for them
CreateAnonymousFrames(aPresContext, aTag, aState, aContent,
newFrame,
=> childItems);
// Set the frame's initial child list
newFrame->SetInitialChildList(*aPresContext, nsnull,
childItems.childList);
nsCSSFrameConstructor::ConstructFrame(nsIPresContext
*,nsFrameConstructorState&,nsIContent *,nsIFrame *,int,nsFrameItems&)
[nsCSSFrameConstructor.cpp:3820]
(lastChild == aFrameItems.lastChild))) {
PRBool haltProcessing = PR_FALSE;
rv = ConstructXULFrame(aPresContext, aState, aContent,
aParentFrame,
=> tag, styleContext, aFrameItems,
haltProcessing);
if (haltProcessing) {
return rv;
}
nsCSSFrameConstructor::CreateTreeWidgetContent(nsIPresContext *,nsIFrame
*,nsIFrame *,nsIContent *,nsIFrame * *,int,int) [nsCSSFrameConstructor.cpp:6285]
GetAbsoluteContainingBlock(aPresContext, aParentFrame),
GetFloaterContainingBlock(aPresContext, aParentFrame));
rv = ConstructFrame(aPresContext, state, aChild, aParentFrame,
PR_FALSE,
=> frameItems);
nsIFrame* newFrame = frameItems.childList;
*aNewFrame = newFrame;
nsTreeRowGroupFrame::CreateScrollbar(nsIPresContext&)
[nsTreeRowGroupFrame.cpp:1057]
nsIFrame* aResult;
mFrameConstructor->CreateTreeWidgetContent(&aPresContext, this,
nsnull, content,
=> &aResult, PR_FALSE,
PR_TRUE);
}
}
nsTreeRowGroupFrame::ReflowBeforeRowLayout(nsIPresContext&,nsHTMLReflowMetrics&,
RowGroupReflowState&,UINT&,nsReflowReason) [nsTreeRowGroupFrame.cpp:630]
if (mShouldHaveScrollbar && (aReflowState.availSize.height !=
NS_UNCONSTRAINEDSIZE)) {
// Ensure the scrollbar has been created.
if (!mScrollbar)
=> CreateScrollbar(aPresContext);
PRInt32 rowCount = 0;
GetVisibleRowCount(rowCount, mContent); // XXX This sucks! Needs to
be cheap!
| Assignee | ||
Updated•26 years ago
|
Status: NEW → ASSIGNED
Target Milestone: M12
Updated•26 years ago
|
Summary: Memory Leak in NS_NewRDFElement → [MLK] Memory Leak in NS_NewRDFElement
Updated•26 years ago
|
Summary: [MLK] Memory Leak in NS_NewRDFElement → [MLK] Potential leak of 17160 bytes - in NS_NewRDFElement
| Assignee | ||
Updated•26 years ago
|
Status: ASSIGNED → RESOLVED
Closed: 26 years ago
Resolution: --- → DUPLICATE
Updated•26 years ago
|
Status: RESOLVED → VERIFIED
Comment 2•26 years ago
|
||
verified
Updated•7 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•