Closed
Bug 131417
Opened 23 years ago
Closed 23 years ago
Memory leak in SetUpFontCharSetInfo()
Categories
(SeaMonkey :: UI Design, defect)
Tracking
(Not tracked)
RESOLVED
FIXED
People
(Reporter: pj, Assigned: roland.mainz)
Details
(Keywords: memory-leak)
Attachments
(3 files)
889 bytes,
patch
|
bzbarsky
:
review+
blizzard
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
924 bytes,
patch
|
jag+mozilla
:
review+
jag+mozilla
:
superreview+
jag+mozilla
:
approval+
|
Details | Diff | Splinter Review |
883 bytes,
patch
|
bzbarsky
:
review+
scc
:
superreview+
asa
:
approval+
|
Details | Diff | Splinter Review |
In nsFontMetricsGTK.cpp:1992 the following line occurs:
NS_WARNING(nsPrintfCString("\n\ncharset = %s", atomToName(charset)).get());
This leaks a char * which atomToName() allocates. I'll attach a patch below.
Reporter | ||
Comment 1•23 years ago
|
||
Updated•23 years ago
|
Status: UNCONFIRMED → NEW
Ever confirmed: true
Comment 2•23 years ago
|
||
Comment on attachment 74515 [details] [diff] [review]
free the memory allocated by atomToName()
r=bzbarsky. Go ahead and ask for sr. :)
Attachment #74515 -
Flags: review+
Comment 3•23 years ago
|
||
r=pavlov. get blizzard or tor to sr=
Comment 4•23 years ago
|
||
Comment on attachment 74515 [details] [diff] [review]
free the memory allocated by atomToName()
sr=blizzard
Attachment #74515 -
Flags: superreview+
Comment 5•23 years ago
|
||
Comment on attachment 74515 [details] [diff] [review]
free the memory allocated by atomToName()
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #74515 -
Flags: approval+
Comment 6•23 years ago
|
||
as NS_WARNING goes to /* nothing */ for non-debug builds, shouldn't this
code be
#ifdef DEBUG
?
Comment 7•23 years ago
|
||
Because of the semi-colon?
Reporter | ||
Comment 8•23 years ago
|
||
This patch adds a few more calls compared to how it was, even in an optimized
build. The NS_WARNING() is not a part of an optimized build - with this patch
there will be a few more syscalls during startup. Since startup time is
important it's probably a good idea to avoid adding more calls that will consume
CPU cycles (and the result isn't used unless it's a debug build).
Component: XP Toolkit/Widgets → XP Apps: GUI Features
Comment 9•23 years ago
|
||
Doh, yes, I see what you mean now (wasn't quite awake before). All that new code
should be in a #ifdef DEBUG.
Reporter | ||
Comment 10•23 years ago
|
||
New patch with the ifdefs added. Does the r/sr/a carry over since it is exactly
the same code with only a new ifdef?
Comment 11•23 years ago
|
||
Comment on attachment 75558 [details] [diff] [review]
Patch, with #ifdef DEBUG.
Depends on the patch, but sr=jag on the added ifdef, and I'm copying over the
r= and a=.
Attachment #75558 -
Flags: superreview+
Attachment #75558 -
Flags: review+
Attachment #75558 -
Flags: approval+
Comment 12•23 years ago
|
||
checked in on the trunk
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Assignee | ||
Comment 13•23 years ago
|
||
Reopen - you forgot to patch the Xlib version of the code... ;-(
Status: RESOLVED → REOPENED
Resolution: FIXED → ---
Assignee | ||
Comment 14•23 years ago
|
||
Taking...
Assignee: jaggernaut → Roland.Mainz
Status: REOPENED → NEW
Assignee | ||
Updated•23 years ago
|
Status: NEW → ASSIGNED
Assignee | ||
Comment 15•23 years ago
|
||
Assignee | ||
Updated•23 years ago
|
Comment 16•23 years ago
|
||
Comment on attachment 75685 [details] [diff] [review]
Xlib port of the GTK+ patch
r=bzbarsky
Attachment #75685 -
Flags: review+
Comment 17•23 years ago
|
||
Comment on attachment 75685 [details] [diff] [review]
Xlib port of the GTK+ patch
sr=scc
Attachment #75685 -
Flags: superreview+
Comment 18•23 years ago
|
||
Comment on attachment 75685 [details] [diff] [review]
Xlib port of the GTK+ patch
a=asa (on behalf of drivers) for checkin to the 1.0 trunk
Attachment #75685 -
Flags: approval+
Comment 19•23 years ago
|
||
checked in on trunk
Status: ASSIGNED → RESOLVED
Closed: 23 years ago → 23 years ago
Resolution: --- → FIXED
Updated•20 years ago
|
Product: Core → Mozilla Application Suite
You need to log in
before you can comment on or make changes to this bug.
Description
•