geode-commits mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From jbarr...@apache.org
Subject [42/46] geode-native git commit: GEODE-2741: Backs out workaround for .NET Environment.Exit issues.
Date Wed, 17 May 2017 17:50:24 GMT
GEODE-2741: Backs out workaround for .NET Environment.Exit issues.


Project: http://git-wip-us.apache.org/repos/asf/geode-native/repo
Commit: http://git-wip-us.apache.org/repos/asf/geode-native/commit/9a06e168
Tree: http://git-wip-us.apache.org/repos/asf/geode-native/tree/9a06e168
Diff: http://git-wip-us.apache.org/repos/asf/geode-native/diff/9a06e168

Branch: refs/heads/develop
Commit: 9a06e1681438c01e3f721f4a3f7b7576bedefd2a
Parents: 6027574
Author: Jacob Barrett <jbarrett@pivotal.io>
Authored: Tue May 16 13:24:16 2017 +0000
Committer: Jacob Barrett <jbarrett@pivotal.io>
Committed: Tue May 16 13:24:16 2017 +0000

----------------------------------------------------------------------
 src/cppcache/include/geode/CacheFactory.hpp | 1 +
 src/cppcache/src/CacheFactory.cpp           | 5 ++---
 2 files changed, 3 insertions(+), 3 deletions(-)
----------------------------------------------------------------------


http://git-wip-us.apache.org/repos/asf/geode-native/blob/9a06e168/src/cppcache/include/geode/CacheFactory.hpp
----------------------------------------------------------------------
diff --git a/src/cppcache/include/geode/CacheFactory.hpp b/src/cppcache/include/geode/CacheFactory.hpp
index ab3cbe0..5d519bb 100644
--- a/src/cppcache/include/geode/CacheFactory.hpp
+++ b/src/cppcache/include/geode/CacheFactory.hpp
@@ -494,6 +494,7 @@ class CPPCACHE_EXPORT CacheFactory
                                     bool closeOk, CachePtr& cptr);
 
   // Set very first time some creates cache
+  static CacheFactoryPtr default_CacheFactory;
   static PoolPtr createOrGetDefaultPool();
   static void* m_cacheMap;
   static void init();

http://git-wip-us.apache.org/repos/asf/geode-native/blob/9a06e168/src/cppcache/src/CacheFactory.cpp
----------------------------------------------------------------------
diff --git a/src/cppcache/src/CacheFactory.cpp b/src/cppcache/src/CacheFactory.cpp
index 43da0d0..ec332e5 100644
--- a/src/cppcache/src/CacheFactory.cpp
+++ b/src/cppcache/src/CacheFactory.cpp
@@ -55,8 +55,7 @@ typedef std::map<std::string, CachePtr> StringToCachePtrMap;
 
 void* CacheFactory::m_cacheMap = (void*)NULL;
 
-// TODO: Why can't this be a shared_ptr?
-CacheFactory* default_CacheFactory = nullptr;
+CacheFactoryPtr CacheFactory::default_CacheFactory = nullptr;
 
 PoolPtr CacheFactory::createOrGetDefaultPool() {
   ACE_Guard<ACE_Recursive_Thread_Mutex> connectGuard(*g_disconnectLock);
@@ -226,7 +225,7 @@ CachePtr CacheFactory::create() {
   cache = getAnyInstance(false);
 
   if (cache == nullptr) {
-    default_CacheFactory = this;
+    default_CacheFactory = shared_from_this();
     Cache_CreatedFromCacheFactory = true;
     cache = create(DEFAULT_CACHE_NAME, dsPtr,
                    dsPtr->getSystemProperties()->cacheXMLFile(), nullptr);


Mime
View raw message