geode-issues mailing list archives

Site index · List index
Message view « Date » · « Thread »
Top « Date » · « Thread »
From "ASF GitHub Bot (JIRA)" <>
Subject [jira] [Commented] (GEODE-3645) Update API CacheFactory::create to return cache object
Date Wed, 29 Nov 2017 23:21:00 GMT


ASF GitHub Bot commented on GEODE-3645:

pivotal-jbarrett commented on a change in pull request #159: GEODE-3645: Update CacheFactory::create
to return Cache by value

 File path: cppcache/integration-test/CacheHelper.cpp
 @@ -87,7 +87,7 @@ CacheHelper::CacheHelper(const char* member_id,
   auto cacheFactory = CacheFactory::createCacheFactory(pp);
-  cachePtr.reset(new Cache(cacheFactory->create()));
+  cachePtr = std::make_shared<Cache>(cacheFactory->create());
 Review comment:

This is an automated message from the Apache Git Service.
To respond to the message, please log on GitHub and use the
URL above to go to the specific comment.
For queries about this service, please contact Infrastructure at:

> Update API CacheFactory::create to return cache object
> ------------------------------------------------------
>                 Key: GEODE-3645
>                 URL:
>             Project: Geode
>          Issue Type: New Feature
>          Components: native client
>            Reporter: David Kimura
> As an application developer I want to control the stack vs heap allocation of my cache
object.  If we change CacheFactory::create to return a cache object then the application user
can pick an allocation scheme.  This also allows application developers to bypass smart pointer
complexity until the developer deems them necessary.
> Example:
> {noformat}
> auto cache = CacheFactory::createFactory().create();
> auto cacheptr = std::make_shared<Cache>(CacheFactory::createFactory().create());
> {noformat}
> Difficulty of implementation is due to Cache/CacheImpl circular dependency.  Here are
a few examples of various approaches to consider:
> Here are the related email threads of interest:

This message was sent by Atlassian JIRA

View raw message