Skip to content

Compiler warning when "delete"ing a client instance #21

@fredlcore

Description

@fredlcore

The following code results in the warning below:

max_cul = new WiFiSpiClient();
[...]
delete max_cul;
max_cul = NULL;
warning: deleting object of polymorphic class type 'WiFiSpiClient' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]
     delete max_cul;

Is there a way to prevent this warning?

Metadata

Metadata

Assignees

No one assigned

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions