You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "Ernest Burghardt (JIRA)" <ji...@apache.org> on 2018/04/09 16:25:00 UTC

[jira] [Updated] (GEODE-4839) Fix type of persistenceInfo parameter on PersistenceManager methods

     [ https://issues.apache.org/jira/browse/GEODE-4839?page=com.atlassian.jira.plugin.system.issuetabpanels:all-tabpanel ]

Ernest Burghardt updated GEODE-4839:
------------------------------------
    Summary: Fix type of persistenceInfo parameter on PersistenceManager methods  (was: Fix type of persistenceInfo parameter on ParsistenceManager methods)

> Fix type of persistenceInfo parameter on PersistenceManager methods
> -------------------------------------------------------------------
>
>                 Key: GEODE-4839
>                 URL: https://issues.apache.org/jira/browse/GEODE-4839
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Blake Bender
>            Priority: Major
>
> Most/all of the methods on the PersistenceManager object take a parameter called persistenceInfo with type 'void*&'.  This presents a number of issues, not the least of which is that, were the parameter actually used, it could leak memory on every call.  The callee is allowed to swap out the incoming value for a newly allocated pointer during any call, and the caller has no way to know when _or how_ to free the memory, since it's a void pointer.  If we change the type of persistenceInfo to std::shared_ptr<void>&, it will be properly accounted for and deleted when no longer in use.



--
This message was sent by Atlassian JIRA
(v7.6.3#76005)