diff options
author | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-01 22:46:50 +0300 |
---|---|---|
committer | Benoit Bolsee <benoit.bolsee@online.be> | 2008-03-01 22:46:50 +0300 |
commit | 0db0f5734d358676b11eccc702cf02adb3174b7e (patch) | |
tree | dbed0e86663eeabe8d333892958310878bfbe533 /source/gameengine/Converter/KX_ConvertProperties.cpp | |
parent | 44314581dc934dc99c9504edf671118a9f988b68 (diff) |
Various mem leaks related to CValue reference count fixed
Diffstat (limited to 'source/gameengine/Converter/KX_ConvertProperties.cpp')
-rw-r--r-- | source/gameengine/Converter/KX_ConvertProperties.cpp | 7 |
1 files changed, 5 insertions, 2 deletions
diff --git a/source/gameengine/Converter/KX_ConvertProperties.cpp b/source/gameengine/Converter/KX_ConvertProperties.cpp index a1807732416..ebfb45066b7 100644 --- a/source/gameengine/Converter/KX_ConvertProperties.cpp +++ b/source/gameengine/Converter/KX_ConvertProperties.cpp @@ -105,8 +105,9 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan // set a subproperty called 'timer' so that // we can register the replica of this property // at the time a game object is replicated (AddObjectActuator triggers this) - - timeval->SetProperty("timer",new CBoolValue(true)); + CValue *bval = new CBoolValue(true); + timeval->SetProperty("timer",bval); + bval->Release(); if (isInActiveLayer) { timemgr->AddTimeProperty(timeval); @@ -128,6 +129,8 @@ void BL_ConvertProperties(Object* object,KX_GameObject* gameobj,SCA_TimeEventMan { scene->AddDebugProperty(gameobj,STR_String(prop->name)); } + // done with propval, release it + propval->Release(); } prop = prop->next; |