Closed
Bug 195515
Opened 23 years ago
Closed 23 years ago
leak of nsNativeAppSupport object
Categories
(SeaMonkey :: UI Design, defect)
SeaMonkey
UI Design
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: bryner, Assigned: bryner)
Details
(Keywords: memory-leak)
Attachments
(1 file)
|
637 bytes,
patch
|
bbaetz
:
review+
|
Details | Diff | Splinter Review |
We always leak the nsNativeAppSupport object because of a refcounting error:
- The object is initially created with a refcount of 1, by main()
- The object is passed to main1(), which assigns it into a nsCOMPtr (refcnt->2)
- The object is passed to the nsAppShellService, which stores it into a member
variable (refcnt->3)
On shutdown:
- The appshell service goes away (refcnt->2)
- main1() exits, releasing the nsCOMPtr (refcnt->1)
| Assignee | ||
Comment 1•23 years ago
|
||
use dont_AddRef when assigning into the nsCOMPtr in main1(), since the object
is passed in with a refcount of 1.
| Assignee | ||
Comment 2•23 years ago
|
||
Appears to have been introduced by lordpixel's checkin for bug 90823.
Comment 3•23 years ago
|
||
Comment on attachment 115968 [details] [diff] [review]
patch
r=bbaetz.
Not that it really matters that we leak something which can't be released until
main() is ending anyway, but hey....
Attachment #115968 -
Flags: review+
| Assignee | ||
Updated•23 years ago
|
Attachment #115968 -
Flags: superreview?(jaggernaut)
| Assignee | ||
Comment 4•23 years ago
|
||
checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
| Assignee | ||
Updated•23 years ago
|
Attachment #115968 -
Flags: superreview?(jaggernaut)
Updated•21 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•