godot-cpp/include/godot_cpp/core
George Marques 38ee8bfcf7 Change constructor/destructor management of extension classes
This makes sure custom constructors are always called on extension
classes. However, note that constructors should not take any parameters,
since Godot doesn't support that. Parameters are ignore in memnew macro.

Use memnew(MyClass()) instead of memnew(MyClass) since it now needs a
value instead of a class name. This macro calls MyClass::_new() (define
in GDCLASS macro) which ultimately calls Godot to create the object,
ensuring that both the Godot and the extension instances are created.

Non Godot classes (that don't derive godot::Object) are constructed as
usual an can have parameters.

memdelete is also changed for the same reason, as it needs to destroy
the Godot object as well, and that automatically frees the bound
extension instance.
2021-09-27 23:08:11 +10:00
..
binder_common.hpp Auto-bind virtual method overrides 2021-09-27 23:08:08 +10:00
builtin_ptrcall.hpp Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00
class_db.hpp Add support for property groups 2021-09-27 23:08:11 +10:00
defs.hpp Re-introduce build-in type code for core types 2021-09-27 23:08:10 +10:00
engine_ptrcall.hpp Fix calling of native functions that return object types 2021-09-27 23:08:10 +10:00
error_macros.hpp Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00
math.hpp Fix formatting of files 2021-09-27 23:08:10 +10:00
memory.hpp Change constructor/destructor management of extension classes 2021-09-27 23:08:11 +10:00
method_bind.hpp Change constructor/destructor management of extension classes 2021-09-27 23:08:11 +10:00
method_ptrcall.hpp Replace bindgins to work with extensions 2021-09-27 23:08:08 +10:00
object.hpp Add support for property groups 2021-09-27 23:08:11 +10:00
type_info.hpp Fix issues with method calls 2021-09-27 23:08:08 +10:00