From 8aff45d8f671e7eb2f404c8f194e06d88c5147c9 Mon Sep 17 00:00:00 2001 From: Mitchell Stokes Date: Fri, 29 Nov 2013 18:34:06 -0800 Subject: 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. --- source/gameengine/GameLogic/SCA_PropertySensor.cpp | 1 + 1 file changed, 1 insertion(+) (limited to 'source/gameengine/GameLogic') diff --git a/source/gameengine/GameLogic/SCA_PropertySensor.cpp b/source/gameengine/GameLogic/SCA_PropertySensor.cpp index f02ac495233..ad57e529297 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; } -- cgit v1.2.3