From 399cb60d4dd86cfa1e85e5e91baa4a939f9c699d Mon Sep 17 00:00:00 2001 From: Nicky Date: Sun, 18 Aug 2013 20:35:07 +0200 Subject: [PATCH] Memory leak; delete mDeprecatedMotions. --- indra/llcharacter/llmotioncontroller.cpp | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/indra/llcharacter/llmotioncontroller.cpp b/indra/llcharacter/llmotioncontroller.cpp index e9fb91ad73..a859fe85f1 100755 --- a/indra/llcharacter/llmotioncontroller.cpp +++ b/indra/llcharacter/llmotioncontroller.cpp @@ -171,6 +171,11 @@ void LLMotionController::deleteAllMotions() for_each(mAllMotions.begin(), mAllMotions.end(), DeletePairedPointer()); mAllMotions.clear(); + + // There might still be motions in mDeprecatedMotions. Don't leak those. + for_each(mDeprecatedMotions.begin(), mDeprecatedMotions.end(), DeletePointer() ); + mDeprecatedMotions.clear(); + // } //-----------------------------------------------------------------------------