[Bf-blender-cvs] [e8ccc18] temp_bullet_ghosts: "Free" function for shapes which only deconstructs the object, but does not handle deallocation.
Lukas Tönne
noreply at git.blender.org
Wed Apr 29 09:08:07 CEST 2015
Commit: e8ccc18131d7eecd34e858b9ed993916e0740ebe
Author: Lukas Tönne
Date: Fri Jan 2 10:37:35 2015 +0100
Branches: temp_bullet_ghosts
https://developer.blender.org/rBe8ccc18131d7eecd34e858b9ed993916e0740ebe
"Free" function for shapes which only deconstructs the object, but does
not handle deallocation.
===================================================================
M intern/rigidbody/RBI_api.h
M intern/rigidbody/rb_bullet_api.cpp
===================================================================
diff --git a/intern/rigidbody/RBI_api.h b/intern/rigidbody/RBI_api.h
index 6b5b670..4f0f638 100644
--- a/intern/rigidbody/RBI_api.h
+++ b/intern/rigidbody/RBI_api.h
@@ -291,6 +291,9 @@ void RB_shape_compound_update_local_aabb(rbCollisionShape *shape);
/* Cleanup --------------------------- */
+/* only free internal data (no dealloc) */
+void RB_shape_free(rbCollisionShape *shape);
+/* free and dealloc */
void RB_shape_delete(rbCollisionShape *shape);
/* Settings --------------------------- */
diff --git a/intern/rigidbody/rb_bullet_api.cpp b/intern/rigidbody/rb_bullet_api.cpp
index d4d4950..2dc7e8b 100644
--- a/intern/rigidbody/rb_bullet_api.cpp
+++ b/intern/rigidbody/rb_bullet_api.cpp
@@ -1073,6 +1073,11 @@ void RB_shape_compound_update_local_aabb(rbCollisionShape *shape)
/* Cleanup --------------------------- */
+void RB_shape_free(rbCollisionShape *shape)
+{
+ shape->~rbCollisionShape();
+}
+
void RB_shape_delete(rbCollisionShape *shape)
{
delete shape;
More information about the Bf-blender-cvs
mailing list