Closed Bug 73309 Opened 25 years ago Closed 25 years ago

[MLK] Leaking <ConstStringImpl>

Categories

(Core :: Layout, defect)

defect
Not set
normal

Tracking

()

VERIFIED FIXED
mozilla0.9

People

(Reporter: beard, Assigned: pollmann)

References

()

Details

(Keywords: memory-leak, Whiteboard: fix in hand)

Attachments

(2 files)

The result of the call to NS_NewCStringInputStream() is leaking at the blame URL above. I noticed a comment on line 977 that says not to release |postDataStream| because it's done somewhere in Necko. If proxying is being done, then that's not really true. The proxy code will grab whatever extra refCount it needs to keep the object alive for the call. The object leaks with a refCount == 1.
Keywords: mlk
Attached patch patchSplinter Review
This should fix the reference imbalance - I had assumed that NewEncodeStream would return an addref'd stream, which it does not - and was leaving an extra reference in the string buffer case. This cleanup moves everything over to nsCOMPtr goodness except NewEncodeStream :S
Status: NEW → ASSIGNED
Whiteboard: fix in hand
Target Milestone: --- → mozilla0.9
Fix checked in.
Marking fixed. :)
Status: ASSIGNED → RESOLVED
Closed: 25 years ago
Resolution: --- → FIXED
*** Bug 75503 has been marked as a duplicate of this bug. ***
Marking verified per last comments.
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: