Closed Bug 56033 Opened 24 years ago Closed 23 years ago

Ouch! Don't use |dont_AddRef| like that! I don't even know what that does!

Categories

(Core :: DOM: Editor, defect, P3)

defect

Tracking

()

VERIFIED FIXED
mozilla0.9.1

People

(Reporter: scc, Assigned: bugzilla)

References

()

Details

Attachments

(1 file)

|(dont_AddRef)(expr)| should be re-written as |dont_AddRef(expr)|.  I'll do an
experiment, but it is likely the first form does not do what you expect, and
therefore leaks.
OK, it really turns out to be a meme originating with buster ... cc'ing him.
I'm sure I just cut-and-pasted some code from somewhere at some point.  I'm not
smart enough to dream that up on my own :)
Nothing was intentional about the use of this idiom.  If it's wrong, kill it
dead. Is it causing leaks?
Two points: (a) turns out this syntax _is_ legal.  See section 13.3.1.1 of the
C++ standard [[Thanks to Waldemar for finding this reference]].  The expression
representing the function to be called can be nested arbitrarily deep in
parentheses.  And (b) this doesn't leak.  The right thing happens.  We only want
to get rid of this form because it's confusing to readers who won't know that
and will think this is some kind of typecast.
Because this code pattern is harmless, future for now. We'll fix post RTM.
Target Milestone: --- → Future
moz 0.9
Status: NEW → ASSIGNED
Target Milestone: Future → mozilla0.9
moving a bunch of 0.9 bugs to 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
scc, sr?
Assignee: jfrancis → blakeross
Status: ASSIGNED → NEW
nice :-)  sr=scc
r=timeless
you learn something new everyday.
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
blake or scc, please verify and mark verified-fixed. thanks!
[verified]
Status: RESOLVED → VERIFIED
You need to log in before you can comment on or make changes to this bug.

Attachment

General

Creator:
Created:
Updated:
Size: