Skip to content

Provider derived class destruction uses static binding instead of dynamic binding #13

Description

@yblake

VS 2022 complains with warning C5205 because Provider abstract class defines a non virtual destructor, which may lead to undefined behaviour as objects destruction in ndfrmwrk.cpp use static binding instead of dynamic binding.

Suggested correction :

  • To ensure all destructors are called, nedd to change ~Provider(void); to virtual ~Provider(void); in ndprov.h
  • Should also comment (or delete) ~NdV1Provider(); and ~NdProvider(); definitions, since these derived constructors are not implemented.
  • Finally, suppress AdditionalOptions /Wv:18 added by PR ADD AdditionalOptions Wv:18

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type

    Projects

    No projects

      Milestone

      No milestone

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions