Skip to content

Conversation

@Vinx911
Copy link
Contributor

@Vinx911 Vinx911 commented Dec 17, 2025

Add a destructor function to RadioLibHal

Solves this error:
error: deleting object of polymorphic class type 'Esp32S3Hal' which has non-virtual destructor might cause undefined behavior [-Werror=delete-non-virtual-dtor]

class Esp32S3Hal : public RadioLibHal {
    // ..................
}

Esp32S3Hal* hal = new Esp32S3Hal();
delete hal;

@jgromes jgromes merged commit d4f7012 into jgromes:master Dec 19, 2025
31 checks passed
@jgromes
Copy link
Owner

jgromes commented Dec 19, 2025

Looking good, and it even provoked a hidden bug in the unit test :) Merged, thank you for the contribution!

@Vinx911 Vinx911 deleted the fix-delete-non-virtual-dtor branch December 22, 2025 01:03
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants