Closed Bug 1071105 Opened 11 years ago Closed 11 years ago

potential memory leak in nsDocShell

Categories

(Core :: DOM: Navigation, defect)

x86_64
Linux
defect
Not set
normal

Tracking

()

RESOLVED INVALID

People

(Reporter: tromey, Assigned: tromey)

Details

Attachments

(1 file)

I don't have a test case for this; I found it by reading code. nsDocShell::ClearProfileTimelineMarkers takes care to free the payload of items in the timeline marker array: for (uint32_t i = 0; i < mProfileTimelineMarkers.Length(); ++i) { delete mProfileTimelineMarkers[i]->mPayload; mProfileTimelineMarkers[i]->mPayload = nullptr; } However, the nsDocShell destructor does not call this or otherwise free the payloads. One fix may be to change mPayload to be an nsAutoPtr.
Assignee: nobody → ttromey
Attachment #8493255 - Flags: review?(bugs)
Component: Developer Tools: Timeline → Document Navigation
Product: Firefox → Core
Don't we call the clear method in Destroy?
(In reply to Olli Pettay [:smaug] from comment #3) > Don't we call the clear method in Destroy? Darn it, we do, and I missed it, in particular the call to SetRecordProfileTimelineMarkers(false). I'm sorry for wasting your time.
Status: NEW → RESOLVED
Closed: 11 years ago
Resolution: --- → INVALID
Attachment #8493255 - Flags: review?(bugs)
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Created:
Updated:
Size: