Closed
Bug 209568
Opened 22 years ago
Closed 22 years ago
[FIX]Freetype code leaks all over
Categories
(Core Graveyard :: GFX: Gtk, defect, P1)
Tracking
(Not tracked)
RESOLVED
FIXED
mozilla1.5alpha
People
(Reporter: bzbarsky, Assigned: bzbarsky)
Details
(Keywords: memory-leak)
Attachments
(1 file, 1 obsolete file)
|
12.35 KB,
patch
|
bstell
:
review+
bryner
:
superreview+
|
Details | Diff | Splinter Review |
I haven't done a particularly thorough examination; it just failed to compile
due to some leak-proofing patches in my tree... Short list:
1) nsFreeTypeGetFaceID leaks if Init() fails on a face
2) LoadNodeTable and GetFontNames both leak the arrayFC array (the getter
addrefs, they do not releas).
3) The same functions, if the array leak is fixed, leak every single entry in
the array, since ElementAt on an nsISupportsArray returns an _addrefed_
pointer.
I may take a shot at converting some of this code to nsCOMArray at some point,
but in the meantime, we could try fixing the leaks by the simple expedient of
actually using nsCOMPtrs for owning references and using QueryElementAt on the
nsISupportsArray....
| Assignee | ||
Comment 1•22 years ago
|
||
We probably want to read this code over and fix any other leaks we find...
| Assignee | ||
Comment 2•22 years ago
|
||
Actually, looks like the faces never got leaked. The arrays themselves did,
though. Fixing the leaks as in attachment 125759 [details] [diff] [review] brought up the issue of
refcounted objects being just deleted and being passed around with a zero
refcount (once the refcount from the leaked array was removed).
This patch just makes everything use refcounting to ensure that life is happy.
Attachment #125759 -
Attachment is obsolete: true
| Assignee | ||
Comment 3•22 years ago
|
||
Comment on attachment 125792 [details] [diff] [review]
Better patch
Going for the double-Brian review. ;)
Attachment #125792 -
Flags: superreview?(bryner)
Attachment #125792 -
Flags: review?(bstell)
| Assignee | ||
Comment 4•22 years ago
|
||
I guess I should take this....
Assignee: pete.zha → bzbarsky
Keywords: mlk
Priority: -- → P1
Summary: Freetype code leaks all over → [FIX]Freetype code leaks all over
Target Milestone: --- → mozilla1.5alpha
Comment 5•22 years ago
|
||
Comment on attachment 125792 [details] [diff] [review]
Better patch
The logic is unchanged and looks okay to me so r=bstell@ix.netcom.com
Attachment #125792 -
Flags: review?(bstell) → review+
Comment 6•22 years ago
|
||
Comment on attachment 125792 [details] [diff] [review]
Better patch
sr=me
Attachment #125792 -
Flags: superreview?(bryner) → superreview+
| Assignee | ||
Comment 7•22 years ago
|
||
Checked in.
Status: NEW → RESOLVED
Closed: 22 years ago
Resolution: --- → FIXED
Updated•17 years ago
|
Product: Core → Core Graveyard
You need to log in
before you can comment on or make changes to this bug.
Description
•