Descriptioncompositor: Add protected virtual destructor to CompositorDelegate.
The use of a protected virtual destructor is to prevent the destruction of a
derived object via a base-class pointer.
That's it, CompositorDelegate should only be deleted through derived class.
Example:
class Delegate {
public:
...
protected:
virtual ~Delegate() {}
};
class Foo : public Delegate {
};
Delegate* delegate = new Foo;
delete delegate; // It should prevent this situation!
R=sky@chromium.org
Committed: http://src.chromium.org/viewvc/chrome?view=rev&revision=102350
Patch Set 1 #
Messages
Total messages: 2 (0 generated)
|