Skip to content

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

@yblake

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

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Type

    No type
    No fields configured for issues without a type.

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions