From db9897f12f26d1de86062c1dc34ec04a8302d62f Mon Sep 17 00:00:00 2001 From: JoelKatz Date: Tue, 1 Jan 2013 18:15:33 -0800 Subject: [PATCH] Fix the tagged cache so that the cache holds strong references. --- src/cpp/ripple/TaggedCache.h | 4 ++-- 1 file changed, 2 insertions(+), 2 deletions(-) diff --git a/src/cpp/ripple/TaggedCache.h b/src/cpp/ripple/TaggedCache.h index 1fbaae9ad..681457ac5 100644 --- a/src/cpp/ripple/TaggedCache.h +++ b/src/cpp/ripple/TaggedCache.h @@ -31,7 +31,7 @@ public: typedef boost::weak_ptr weak_data_ptr; typedef boost::shared_ptr data_ptr; - typedef std::pair cache_entry; + typedef std::pair cache_entry; typedef std::pair cache_pair; protected: @@ -157,7 +157,7 @@ template bool TaggedCache::touch } // In map but not cache, put in cache - mCache.insert(cache_pair(key, cache_entry(time(NULL), weak_data_ptr(cit->second.second)))); + mCache.insert(cache_pair(key, cache_entry(time(NULL), data_ptr(cit->second.second)))); return true; }