We should make all inheritance from angle::NonCopyable private so the compiler will complain about this (admittedly unlikely) code:
class Foo: angle::NonCopyable {
virtual ~Foo() { ... }
};
angle::NonCopyable *p = new Foo;
delete p;
In the above code ~Foo() is not called, only ~NonCopyable(), because the latter is not virtual. Making it virtual would add overhead to all derived classes which don't already have a virtual method.
We can also change public->protected and protected->private in NonCopyable.
Comment 1 by fjhenigman@chromium.org
, May 4 2017