Closed
Bug 391485
Opened 17 years ago
Closed 17 years ago
memory leak in nsToolkitProfileService::Flush
Categories
(Toolkit :: Startup and Profile System, defect)
Tracking
()
RESOLVED
FIXED
People
(Reporter: eagle.lu, Assigned: eagle.lu)
Details
(Keywords: memory-leak)
Attachments
(2 files, 3 obsolete files)
618 bytes,
patch
|
benjamin
:
review+
|
Details | Diff | Splinter Review |
472 bytes,
patch
|
benjamin
:
review+
bzbarsky
:
approval1.9+
|
Details | Diff | Splinter Review |
Using memory leak detecting tool libumem.so on opensolaris as following: 1. export LD_PRELOAD=libumem.so 2. export UMEM_DEBUG=default 3. export LD_LIBRARY_PATH=dist/bin (full pathname of thunderbird-bin) 4. mdb ./thunderbird-bin 5. ::run -P (in mdb) libumem.so will detect many memory leaks. one of them is a malloc() called in nsToolkitProfileService::Flush()
Attachment #275928 -
Attachment is obsolete: true
Updated•17 years ago
|
Component: General → XRE Startup
Product: Thunderbird → Toolkit
QA Contact: general → xre.startup
Attachment #275929 -
Flags: review? → review?(benjamin)
Comment 3•17 years ago
|
||
Comment on attachment 275929 [details] [diff] [review] patch There are other paths out which could leak buffer... can you make buffer an autoclass intead?: nsAutoArrayPtr<char> buffer = new char[100 + MAXPATHLEN * pCount];
Attachment #275929 -
Flags: review?(benjamin) → review-
Attachment #275929 -
Attachment is obsolete: true
Attachment #276072 -
Flags: review?(benjamin)
Comment 5•17 years ago
|
||
Comment on attachment 276072 [details] [diff] [review] use nsAutoArrayPtr<char> Why did you need to put the declaration at the top, instead of when it's first used? Please change that unless there's a good reason.
Attachment #276072 -
Flags: review?(benjamin) → review+
Attachment #276729 -
Flags: review?(benjamin)
Comment 7•17 years ago
|
||
Comment on attachment 276729 [details] [diff] [review] move the declaration before the first use Still don't understand why you don't just declare it on the same line you use it, but this is ok.
Attachment #276729 -
Flags: review?(benjamin) → review+
Attachment #276729 -
Attachment is obsolete: true
Sorry for misunderstanding your point.
Attachment #276933 -
Flags: review?(benjamin)
Updated•17 years ago
|
Attachment #276933 -
Flags: review?(benjamin) → review+
Attachment #276933 -
Flags: approval1.9?
Comment 9•17 years ago
|
||
Comment on attachment 276933 [details] [diff] [review] combine the declaration and assignment in a line a=bzbarsky
Attachment #276933 -
Flags: approval1.9? → approval1.9+
Comment 10•17 years ago
|
||
Checking in mozilla/toolkit/profile/src/nsToolkitProfileService.cpp; /cvsroot/mozilla/toolkit/profile/src/nsToolkitProfileService.cpp,v <-- nsToolkitProfileService.cpp new revision: 1.17; previous revision: 1.16 done
Status: ASSIGNED → RESOLVED
Closed: 17 years ago
Resolution: --- → FIXED
Whiteboard: checkin-needed
Component: XRE Startup → Startup and Profile System
QA Contact: xre.startup → startup
You need to log in
before you can comment on or make changes to this bug.
Description
•