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)
Core
DOM: Editor
Tracking
()
VERIFIED
FIXED
mozilla0.9.1
People
(Reporter: scc, Assigned: bugzilla)
References
()
Details
Attachments
(1 file)
17.78 KB,
patch
|
Details | Diff | Splinter Review |
|(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.
Reporter | ||
Comment 1•24 years ago
|
||
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?
Reporter | ||
Comment 3•24 years ago
|
||
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.
Comment 4•24 years ago
|
||
Because this code pattern is harmless, future for now. We'll fix post RTM.
Target Milestone: --- → Future
Comment 6•24 years ago
|
||
moving a bunch of 0.9 bugs to 0.9.1
Target Milestone: mozilla0.9 → mozilla0.9.1
Assignee | ||
Comment 7•23 years ago
|
||
Reporter | ||
Comment 9•23 years ago
|
||
nice :-) sr=scc
Comment 10•23 years ago
|
||
r=timeless you learn something new everyday.
Assignee | ||
Comment 11•23 years ago
|
||
Fix checked in.
Status: NEW → RESOLVED
Closed: 23 years ago
Resolution: --- → FIXED
Comment 12•23 years ago
|
||
blake or scc, please verify and mark verified-fixed. thanks!
You need to log in
before you can comment on or make changes to this bug.
Description
•