New issue
Advanced search Search tips
Note: Color blocks (like or ) mean that a user may not be available. Tooltip shows the reason.

Issue 718286 link

Starred by 1 user

Issue metadata

Status: WontFix
Owner:
Last visit 16 days ago
Closed: May 2017
EstimatedDays: ----
NextAction: ----
OS: ----
Pri: 3
Type: Bug



Sign in to add a comment

NonCopyable should be a private base class

Project Member Reported by fjhenigman@chromium.org, May 4 2017

Issue description

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.
 
Status: WontFix (was: Started)
this was supposed to be an ANGLE bug

Sign in to add a comment