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

Jacob S. Barrett updated GEODE-4186:
------------------------------------
    Description: 
Replace all decayed array parameters (Type *) with std::vector. For example
{code}
void writeIntArray(int32_t* array, size_t length);
int32_t* readIntArray(size_t& length);
{code}
to
{code}
void writeIntArray(const std::vector<int32_t>& array);
std::vector<int32_t> readIntArray();
{code}

This removes the ambiguity around memory ownership, makes the method functional 
(no out param), collocates the length and other array attributes with the 
vector, and removes null.

  was:
Replace all decayed array parameters (Type *) with std::vector. For example
{{{
void writeIntArray(int32_t* array, size_t length);
int32_t* readIntArray(size_t& length);
}}}
to
{{{
void writeIntArray(const std::vector<int32_t>& array);
std::vector<int32_t> readIntArray();
}}}



> Replace all decayed array parameters (Type *) with std::vector.
> ---------------------------------------------------------------
>
>                 Key: GEODE-4186
>                 URL: https://issues.apache.org/jira/browse/GEODE-4186
>             Project: Geode
>          Issue Type: Improvement
>          Components: native client
>            Reporter: Jacob S. Barrett
>
> Replace all decayed array parameters (Type *) with std::vector. For example
> {code}
> void writeIntArray(int32_t* array, size_t length);
> int32_t* readIntArray(size_t& length);
> {code}
> to
> {code}
> void writeIntArray(const std::vector<int32_t>& array);
> std::vector<int32_t> readIntArray();
> {code}
> This removes the ambiguity around memory ownership, makes the method 
> functional (no out param), collocates the length and other array attributes 
> with the vector, and removes null.



--
This message was sent by Atlassian JIRA
(v6.4.14#64029)

Reply via email to