[MLK] Leaking nsAttributeContent objects

VERIFIED FIXED in M14

Status

()

P3
normal
VERIFIED FIXED
19 years ago
19 years ago

People

(Reporter: beard, Assigned: rods)

Tracking

Trunk
Points:
---

Firefox Tracking Flags

(Not tracked)

Details

(URL)

(Reporter)

Description

19 years ago
If you look at the blame URL above, I believe that the main reference held by the 
content variable is never released, which it should be because textFrame->Init() 
grabs another reference to content. With the following patch, the leak seems to 
go away:

Index: mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp
===================================================================
RCS file: /cvsroot/mozilla/layout/html/style/src/nsCSSFrameConstructor.cpp,v
retrieving revision 1.347
diff -c -2 -r1.347 nsCSSFrameConstructor.cpp
*** nsCSSFrameConstructor.cpp	2000/02/04 03:16:47	1.347
--- nsCSSFrameConstructor.cpp	2000/02/07 07:15:33
***************
*** 681,687 ****
          nsresult rv = NS_ERROR_FAILURE;
          if (nsnull != attrName) {
!           nsIContent* content = nsnull;
            nsIFrame*   textFrame = nsnull;
!           NS_NewAttributeContent(&content);
            if (nsnull != content) {
              nsCOMPtr<nsIAttributeContent> 
attrContent(do_QueryInterface(content));
--- 681,687 ----
          nsresult rv = NS_ERROR_FAILURE;
          if (nsnull != attrName) {
!           nsCOMPtr<nsIContent> content;
            nsIFrame*   textFrame = nsnull;
!           NS_NewAttributeContent(getter_AddRefs(content));
            if (nsnull != content) {
              nsCOMPtr<nsIAttributeContent> 
attrContent(do_QueryInterface(content));
(Assignee)

Updated

19 years ago
Status: NEW → ASSIGNED
Target Milestone: M14
(Assignee)

Comment 1

19 years ago
Thansk for the patch - fixed
Status: ASSIGNED → RESOLVED
Last Resolved: 19 years ago
Resolution: --- → FIXED

Comment 2

19 years ago
Marking verified fixed per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.