Daniel Holbert wrote:

(a) Your class should have an explicitly-declared non-public destructor. 
(should be 'private' or 'protected')
Except for refcounted base classes (which as you note need to have a protected virtual destructor), is there a correct style as to whether the destructor should be private or protected and virtual or nonvirtual?

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)?

--
Warning: May contain traces of nuts.
_______________________________________________
dev-platform mailing list
dev-platform@lists.mozilla.org
https://lists.mozilla.org/listinfo/dev-platform

Reply via email to