Closed
Bug 122081
Opened 23 years ago
Closed 23 years ago
Universalchardet leaks memory
Categories
(Core :: Internationalization, defect, P3)
Core
Internationalization
Tracking
()
VERIFIED
FIXED
mozilla1.0
People
(Reporter: ttathome, Assigned: shanjian)
References
()
Details
(Keywords: intl, memory-leak)
Attachments
(1 file)
1.15 KB,
patch
|
shanjian
:
review+
brendan
:
superreview+
|
Details | Diff | Splinter Review |
The universal_charset_detector always leaks memory at its deallocation due to the broken destructor chain. I happened to notice the fact while running a standalone program which processed a large set of files via the component in a one instance per file manner. (The program essentially is an infinite loop version of the UniversalChardetTest.) The offending class is nsCharSetProber, the base class of many other Prober classes, and the missing virtual destructor in the class prevents the invocation of the derived classes' destructors. The patch will follow.
Reporter | ||
Comment 1•23 years ago
|
||
The fix for the nsCharSetProber class declaration, plus fix for nsUniversalDetector methods, which may cause another leak when the object is reused after Reset().
Updated•23 years ago
|
Comment 2•23 years ago
|
||
pass to shanjian
Assignee | ||
Comment 3•23 years ago
|
||
Comment on attachment 66671 [details] [diff] [review] Fix for memleaks in the universalchardet module r=shanjian
Attachment #66671 -
Flags: review+
Comment 5•23 years ago
|
||
Comment on attachment 66671 [details] [diff] [review] Fix for memleaks in the universalchardet module sr=brendan@mozilla.org /be
Attachment #66671 -
Flags: superreview+
Comment 6•23 years ago
|
||
This patch needs to be checked in as soon as possible. it is a no-brainer, can we get this for 0.9.9 ?
Assignee | ||
Comment 7•23 years ago
|
||
Because there are too many checkin yesterday, all checkins have to be metered. Unfortunately, I did not got the permission to check in this patch. I will try it for 1.0.
Comment 8•23 years ago
|
||
nsbeta1+, shanjian- do we have the same problem in the all detector. if so, please open a bugscape bug and fix that (mark nsbeta1)
Comment 9•23 years ago
|
||
Shanjian, just check it in when the tree opens later today for approved 0.9.9 checkins (it's now closed for smoketest blocker fixing only), a=brendan@mozilla.org on behalf of drivers. /be
Assignee | ||
Comment 10•23 years ago
|
||
fix checked in.
Assignee | ||
Comment 11•23 years ago
|
||
marked as fixed.
Status: ASSIGNED → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 12•22 years ago
|
||
Seems works fine with me on latast trunk build, mark as verified. Please re-open if still see the problem.
Status: RESOLVED → VERIFIED
You need to log in
before you can comment on or make changes to this bug.
Description
•