Closed
Bug 1071105
Opened 11 years ago
Closed 11 years ago
potential memory leak in nsDocShell
Categories
(Core :: DOM: Navigation, defect)
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 | ||
Comment 1•11 years ago
|
||
| Assignee | ||
Comment 2•11 years ago
|
||
| Assignee | ||
Updated•11 years ago
|
Assignee: nobody → ttromey
| Assignee | ||
Updated•11 years ago
|
Attachment #8493255 -
Flags: review?(bugs)
Updated•11 years ago
|
Component: Developer Tools: Timeline → Document Navigation
Product: Firefox → Core
Comment 3•11 years ago
|
||
Don't we call the clear method in Destroy?
| Assignee | ||
Comment 4•11 years ago
|
||
(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
Updated•11 years ago
|
Attachment #8493255 -
Flags: review?(bugs)
You need to log in
before you can comment on or make changes to this bug.
Description
•