From e7ba4eca9f7ea767d75db8ecc2d73c1e7c217b7e Mon Sep 17 00:00:00 2001 From: Juan Linietsky Date: Thu, 9 Apr 2015 00:49:48 -0300 Subject: -function remove_and_delete_child removed. Just use child.free() or child.queue_free() instead. Fixes #1603 --- scene/main/node.cpp | 5 +++-- scene/main/node.h | 2 +- 2 files changed, 4 insertions(+), 3 deletions(-) diff --git a/scene/main/node.cpp b/scene/main/node.cpp index fbdc87a7cc..145ce22453 100644 --- a/scene/main/node.cpp +++ b/scene/main/node.cpp @@ -295,7 +295,7 @@ void Node::add_child_notify(Node *p_child) { // to be used when not wanted } - +/* void Node::remove_and_delete_child(Node *p_child) { ERR_FAIL_NULL( p_child ); @@ -305,6 +305,7 @@ void Node::remove_and_delete_child(Node *p_child) { memdelete(p_child); } +*/ void Node::remove_child_notify(Node *p_child) { @@ -1763,7 +1764,7 @@ void Node::_bind_methods() { ObjectTypeDB::bind_method(_MD("get_name"),&Node::get_name); ObjectTypeDB::bind_method(_MD("add_child","node:Node"),&Node::add_child); ObjectTypeDB::bind_method(_MD("remove_child","node:Node"),&Node::remove_child); - ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child); + //ObjectTypeDB::bind_method(_MD("remove_and_delete_child","node:Node"),&Node::remove_and_delete_child); ObjectTypeDB::bind_method(_MD("get_child_count"),&Node::get_child_count); ObjectTypeDB::bind_method(_MD("get_children"),&Node::_get_children); ObjectTypeDB::bind_method(_MD("get_child:Node","idx"),&Node::get_child); diff --git a/scene/main/node.h b/scene/main/node.h index 47f49eb625..175c9a1a37 100644 --- a/scene/main/node.h +++ b/scene/main/node.h @@ -143,7 +143,7 @@ protected: virtual void add_child_notify(Node *p_child); virtual void remove_child_notify(Node *p_child); virtual void move_child_notify(Node *p_child); - void remove_and_delete_child(Node *p_child); + //void remove_and_delete_child(Node *p_child); void _propagate_replace_owner(Node *p_owner,Node* p_by_owner); -- cgit v1.2.3