Movatterモバイル変換


[0]ホーム

URL:


Skip to content

Navigation Menu

Sign in
Appearance settings

Search code, repositories, users, issues, pull requests...

Provide feedback

We read every piece of feedback, and take your input very seriously.

Saved searches

Use saved searches to filter your results more quickly

Sign up
Appearance settings

Missing virtual destructor forPrint class #256

Open
Labels
@ondra-novak

Description

@ondra-novak

Description

Missing virtual destructor - memory leak and UB

Environment

First found on R4, but it is general

Current behavior

Warning while compiling sketch, possible UB.

packages/arduino/hardware/renesas_uno/1.5.0/libraries/WiFiS3/src/Modem.cpp: In destructor 'ModemClass::~ModemClass()':packages/arduino/hardware/renesas_uno/1.5.0/libraries/WiFiS3/src/Modem.cpp:27:14: warning: deleting object of polymorphic class type 'UART' which has non-virtual destructor might cause undefined behavior [-Wdelete-non-virtual-dtor]       delete _serial;

ModemClass extends Serial which extends Print.

Expected behavior

no warnings

Additional information

This class is very base class of all streams and other i/o components.

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions


      [8]ページ先頭

      ©2009-2025 Movatter.jp