On 7/10/2014 10:46 AM, Daniel Holbert wrote:
First, if your class is abstract, then it shouldn't have
AddRef/Release implementations to begin with. Those belong on the
concrete subclasses -- not on your abstract base class.
What's correct code for abstract class Foo (implementing interfaces
IFoo1 and IFoo2) with derived classes Bar and Baz (implementing
interfaces IBar1 and IBar2 or IBaz1 and IBaz2 respectively)?
Shouldn't the refcounting still be on the concrete classes?
Why?
This happens for example with nsRunnable: nsRunnable does the
refcounting, and all the derivations of nsRunnable only have to worry
about overriding Run because there's a virtual destructor.
--BDS
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform