Fix container and string leaks
Some functions return a new instance of such containers, but instead we made a copy of them, without taking ownership of the original created by the function. Now we use a specific constructor taking ownership on the godot_* struct.
This commit is contained in:
@@ -10,6 +10,11 @@ namespace godot {
|
||||
class NodePath {
|
||||
godot_node_path _node_path;
|
||||
|
||||
friend class Variant;
|
||||
inline explicit NodePath(godot_node_path node_path) {
|
||||
_node_path = node_path;
|
||||
}
|
||||
|
||||
public:
|
||||
NodePath();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user