Quellcode durchsuchen

"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.
Andy Maloney vor 2 Jahren
Ursprung
Commit
5dd2928790
1 geänderte Dateien mit 1 neuen und 0 gelöschten Zeilen
  1. 1 0
      include/godot_cpp/classes/wrapped.hpp

+ 1 - 0
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() {