diff --git a/indra/llcharacter/llkeyframemotion.cpp b/indra/llcharacter/llkeyframemotion.cpp
index d8a4acecc1dae39c026320361e8ac2d89c142f13..304de4c6d1140933121bc2a751c08ec209b94171 100644
--- a/indra/llcharacter/llkeyframemotion.cpp
+++ b/indra/llcharacter/llkeyframemotion.cpp
@@ -1838,7 +1838,8 @@ void LLKeyframeMotion::setEaseOut(F32 ease_in)
 //-----------------------------------------------------------------------------
 void LLKeyframeMotion::flushKeyframeCache()
 {
-	LLKeyframeDataCache::clear();
+	// TODO: Make this safe to do
+// 	LLKeyframeDataCache::clear();
 }
 
 //-----------------------------------------------------------------------------
@@ -2092,6 +2093,7 @@ void LLKeyframeDataCache::removeKeyframeData(const LLUUID& id)
 	keyframe_data_map_t::iterator found_data = sKeyframeDataMap.find(id);
 	if (found_data != sKeyframeDataMap.end())
 	{
+		delete found_data->second;
 		sKeyframeDataMap.erase(found_data);
 	}
 }
@@ -2122,6 +2124,7 @@ LLKeyframeDataCache::~LLKeyframeDataCache()
 //-----------------------------------------------------------------------------
 void LLKeyframeDataCache::clear()
 {
+	for_each(sKeyframeDataMap.begin(), sKeyframeDataMap.end(), DeletePairedPointer());
 	sKeyframeDataMap.clear();
 }
 
diff --git a/indra/llcharacter/llkeyframemotion.h b/indra/llcharacter/llkeyframemotion.h
index 5a03f7549ae108f0f0c6ada24e9edadd8c21aedf..54cf2fefcd78751cea62372d383e16fdf8ea81db 100644
--- a/indra/llcharacter/llkeyframemotion.h
+++ b/indra/llcharacter/llkeyframemotion.h
@@ -20,7 +20,6 @@
 #include "llhandmotion.h"
 #include "lljointstate.h"
 #include "llmotion.h"
-#include "llmemory.h"
 #include "llptrskipmap.h"
 #include "llquaternion.h"
 #include "v3dmath.h"
@@ -132,7 +131,7 @@ class LLKeyframeMotion :
 	BOOL	serialize(LLDataPacker& dp) const;
 	BOOL	deserialize(LLDataPacker& dp);
 	void	writeCAL3D(apr_file_t* fp);
-	BOOL	isLoaded() { return mJointMotionList.notNull(); }
+	BOOL	isLoaded() { return mJointMotionList != NULL; }
 
 
 	// setters for modifying a keyframe animation
@@ -372,11 +371,8 @@ class LLKeyframeMotion :
 	//-------------------------------------------------------------------------
 	// JointMotionList
 	//-------------------------------------------------------------------------
-	class JointMotionList : public LLRefCount
+	class JointMotionList
 	{
-	protected:
-		~JointMotionList();
-
 	public:
 		U32						mNumJointMotions;
 		JointMotion*			mJointMotionArray;
@@ -394,6 +390,7 @@ class LLKeyframeMotion :
 		LLBBoxLocal				mPelvisBBox;
 	public:
 		JointMotionList();
+		~JointMotionList();
 		U32 dumpDiagInfo();
 	};
 
@@ -404,7 +401,7 @@ class LLKeyframeMotion :
 	//-------------------------------------------------------------------------
 	// Member Data
 	//-------------------------------------------------------------------------
-	LLPointer<JointMotionList>		mJointMotionList;
+	JointMotionList*				mJointMotionList;
 	LLJointState*					mJointStates;
 	LLJoint*						mPelvisp;
 	LLCharacter*					mCharacter;
@@ -424,7 +421,7 @@ class LLKeyframeDataCache
 	LLKeyframeDataCache(){};
 	~LLKeyframeDataCache();
 
-	typedef std::map<LLUUID, LLPointer<class LLKeyframeMotion::JointMotionList> > keyframe_data_map_t; 
+	typedef std::map<LLUUID, class LLKeyframeMotion::JointMotionList*> keyframe_data_map_t; 
 	static keyframe_data_map_t sKeyframeDataMap;
 
 	static void addKeyframeData(const LLUUID& id, LLKeyframeMotion::JointMotionList*);
diff --git a/indra/newview/llviewermessage.cpp b/indra/newview/llviewermessage.cpp
index ae28df7922339a5e256761ba7dd9ca27d2ced811..f907ac698e335a19555cc81c631c8da227fc9b67 100644
--- a/indra/newview/llviewermessage.cpp
+++ b/indra/newview/llviewermessage.cpp
@@ -73,7 +73,6 @@
 #include "llimpanel.h"
 #include "llinventorymodel.h"
 #include "llinventoryview.h"
-#include "llkeyframemotion.h" 
 #include "llmenugl.h"
 #include "llmutelist.h"
 #include "llnetmap.h"
@@ -2695,8 +2694,6 @@ void process_agent_movement_complete(LLMessageSystem* msg, void**)
 
 	llinfos << "Changing home region to " << x << ":" << y << llendl;
 
-	LLKeyframeDataCache::clear();
-
 	// set our upstream host the new simulator and shuffle things as
 	// appropriate.
 	LLVector3 shift_vector = regionp->getPosRegionFromGlobal(