[Bf-blender-cvs] [8aff45d] master: Fix T36804: the property sensor when set to interval was causing a memory leak
Mitchell Stokes
noreply at git.blender.org
Sat Nov 30 03:41:05 CET 2013
Commit: 8aff45d8f671e7eb2f404c8f194e06d88c5147c9
Author: Mitchell Stokes
Date: Fri Nov 29 18:34:06 2013 -0800
http://developer.blender.org/rB8aff45d8f671e7eb2f404c8f194e06d88c5147c9
Fix T36804: the property sensor when set to interval was causing a memory leak
The property sensor was using CValue::FindIdentifier(), which does an AddRef(). However,
the property sensor was not calling Release() when it was done with the value. This could
cause more leaks when used in conjunction with the copy property actuator since it would
really throw off ref counts.
===================================================================
M source/gameengine/GameLogic/SCA_PropertySensor.cpp
===================================================================
diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
index f02ac49..ad57e52 100644
--- a/source/gameengine/GameLogic/SCA_PropertySensor.cpp
+++ b/source/gameengine/GameLogic/SCA_PropertySensor.cpp
@@ -207,6 +207,7 @@ bool SCA_PropertySensor::CheckPropertyCondition()
result = (min <= val) && (val <= max);
}
+ orgprop->Release();
break;
}
More information about the Bf-blender-cvs
mailing list