From 5dd292879060e0608164b139433d8f2ac84824e4 Mon Sep 17 00:00:00 2001 From: Andy Maloney Date: Tue, 17 Jan 2023 19:30:18 -0500 Subject: [PATCH] "Wrapped" has virtual functions so it should have a virtual destructor. Deleting an object through a pointer to a base class is undefined behaviour unless the destructor in the base class is virtual. --- include/godot_cpp/classes/wrapped.hpp | 1 + 1 file changed, 1 insertion(+) diff --git a/include/godot_cpp/classes/wrapped.hpp b/include/godot_cpp/classes/wrapped.hpp index 7427dcb2..fbab0556 100644 --- a/include/godot_cpp/classes/wrapped.hpp +++ b/include/godot_cpp/classes/wrapped.hpp @@ -77,6 +77,7 @@ protected: Wrapped(const StringName p_godot_class); Wrapped(GodotObject *p_godot_object); + virtual ~Wrapped() {} public: static StringName &get_class_static() {