Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

src: add missing virtual destructors #23215

Closed
wants to merge 3 commits into from

Commits on Oct 2, 2018

  1. src: add virtual desctructor to Options class

    Currently the Options class has a virtual function but no virtual
    destructor which means that if delete is called on a Options pointer
    to a derived instance, the derived destructor will not get called.
    
    The following warning is currently being printed when
    compiling:
    
    warning: delete called on non-final 'node::PerIsolateOptions' that has
    virtual functions but non-virtual destructor [-Wdelete-non-virtual-dtor]
        delete __ptr;
    
    This commit adds a virtual destructor.
    danbev committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    68e5373 View commit details
    Browse the repository at this point in the history
  2. crypto: add virtual dtor to KeyPairGenerationConfig

    Currently the KeyPairGenerationConfigs class has a virtual function
    but no virtual destructor which means that if delete is called on a
    KeyPairGenerationConfig pointer to a derived instance, the derived
    destructor will not get called.
    
    The following warning is currently being printed when
    compiling:
    
    warning: delete called on 'node::crypto::KeyPairGenerationConfig' that
    is abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
        delete __ptr;
    
    This commit adds a virtual destructor.
    danbev committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    0384ab7 View commit details
    Browse the repository at this point in the history
  3. inspector: add virtual destructor to WorkerDelegate

    Currently the WorkerDelegate class has a virtual function
    but no virtual destructor which means that if delete is called on a
    WorkerDelegate pointer to a derived instance, the derived destructor
    will not get called.
    
    The following warning is currently being printed when
    compiling:
    
    warning: delete called on 'node::inspector::WorkerDelegate' that is
    abstract but has non-virtual destructor [-Wdelete-non-virtual-dtor]
        delete __ptr;
        ^
    
    This commit adds a virtual destructor.
    danbev committed Oct 2, 2018
    Configuration menu
    Copy the full SHA
    cbda824 View commit details
    Browse the repository at this point in the history