Code review comment for lp:~saviq/unity-api/add-shell-notifications-api

Revision history for this message
Michi Henning (michihenning) wrote :

> W dniu 16.05.2013 10:01, Michał Sawicz pisze:
> > Indeed. Fixed. Should the others (SourceInterface, ModelInterface)
> > follow the same, even though it's not necessary due to pure virtuals?

For self-documentation purposes and clarity, it makes sense to make all the constructors protected, even if there are pure virtual methods elsewhere in the class.

> What about pure virtual destructors? Should we make them so, too?

No. Destructors should to remain public. There really is no point making the destructor in a base class protected. It would prevent stack allocation of the class (if it were not abstract). But, seeing the class is abstract already, there is no point in a protected destructor.

« Back to merge proposal