Closed
Bug 1009
Opened 26 years ago
Closed 26 years ago
CSSDeclarationImpl Memory Leak
Categories
(Core :: CSS Parsing and Computation, defect, P2)
Tracking
()
VERIFIED
WORKSFORME
People
(Reporter: troy, Assigned: peterl-retired)
References
()
Details
Purify reports seven CSSDeclarationImpl objects leaked when viewing demo1.
I looked at it for a while, but I couldn't easily determine the problem. I did
change some of the html\style\src code to make sure the NS_ADDREF(),
NS_ADDREF_THIS(), NS_NEWXPCOM(), and NS_DELETEXPCOM() macros were used. This
makes Kipp's ref counting code report more information
I also added a missing NS_RELEAES(declaration) to
CSSParserImpl::ParseDeclarations(), but that didn't fix it.
Here's the Purify output:
[W] MLK: Memory leak of 336 bytes from 7 blocks allocated in
CSSDeclarationImpl::new(UINT)
Distribution of leaked blocks
Allocation location
new(UINT) [new.cpp:23]
CSSDeclarationImpl::new(UINT) [nsCSSDeclaration.cpp:832]
NS_NewCSSDeclaration(nsICSSDeclaration * *) [nsCSSDeclaration.cpp:2493]
CSSParserImpl::ParseDeclarationBlock(int *,int) [nsCSSParser.cpp:1032]
}
nsICSSDeclaration* declaration = nsnull;
if (NS_OK == NS_NewCSSDeclaration(&declaration)) {
=> PRInt32 count = 0;
for (;;) {
PRInt32 hint;
if (ParseDeclaration(aErrorCode, declaration,
aCheckForBraces, &hint)) {
CSSParserImpl::ParseDeclarations(nsString const&,nsIURL *,nsIStyleRule
*&) [nsCSSParser.cpp:438]
nsGenericHTMLElement::SetAttribute(nsIAtom *,nsString const&,int)
[nsGenericHTMLElement.cpp:1153]
nsHTMLSpanElement::SetAttribute(nsIAtom *,nsString const&,int)
[nsHTMLSpanElement.cpp:61]
AddAttributes [nsHTMLContentSink.cpp:448]
SinkContext::OpenContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:912]
HTMLContentSink::OpenContainer(nsIParserNode const&)
[nsHTMLContentSink.cpp:1687]
CNavDTD::OpenContainer(nsIParserNode const&,int) [CNavDTD.cpp:2359]
CNavDTD::HandleDefaultStartToken(CToken *,nsHTMLTag,nsIParserNode&)
[CNavDTD.cpp:576]
CNavDTD::HandleStartToken(CToken *) [CNavDTD.cpp:661]
NavDispatchTokenHandler(CToken *,nsIDTD *) [CNavDTD.cpp:293]
CTokenHandler::()(CToken *,nsIDTD *) [nsTokenHandler.cpp:80]
[W] MLK: Memory leak of 228 bytes from 3 blocks allocated in
CSSDeclarationImpl::AppendValue(int,nsCSSValue const&)
[W] MLK: Memory leak of 36 bytes from 3 blocks allocated in
CSSDeclarationImpl::AppendValue(int,nsCSSValue const&)
[W] MLK: Memory leak of 64 bytes from 2 blocks allocated in
nsVoidArray::InsertElementAt(void *,int)
[W] MLK: Memory leak of 48 bytes from 4 blocks allocated in
CSSDeclarationImpl::AppendValue(int,nsCSSValue const&)
[W] MLK: Memory leak of 368 bytes from 4 blocks allocated in
CSSDeclarationImpl::AppendValue(int,nsCSSValue const&)
[W] MLK: Memory leak of 128 bytes from 4 blocks allocated in
nsVoidArray::InsertElementAt(void *,int)
Assignee | ||
Updated•26 years ago
|
Status: NEW → RESOLVED
Closed: 26 years ago
Resolution: --- → WORKSFORME
Assignee | ||
Comment 1•26 years ago
|
||
Didn't see any leaks (10/8/98).
Purify 6.0 isn't reporting any problems either. Somehow I guess it
got fixed...
You need to log in
before you can comment on or make changes to this bug.
Description
•