[ https://issues.apache.org/jira/browse/GEODE-10098?page=com.atlassian.jira.plugin.system.issuetabpanels:comment-tabpanel&focusedCommentId=17924685#comment-17924685 ]
ASF GitHub Bot commented on GEODE-10098: ---------------------------------------- mreddington closed pull request #943: GEODE-10098: Removed explicit new and delete in favor of unique_ptr URL: https://github.com/apache/geode-native/pull/943 > TcrConnection::readMessage should not be explicitly allocating memory > --------------------------------------------------------------------- > > Key: GEODE-10098 > URL: https://issues.apache.org/jira/browse/GEODE-10098 > Project: Geode > Issue Type: Improvement > Components: native client > Reporter: Blake Bender > Priority: Major > Labels: pull-request-available > > This method calls new to read an array of bytes, then returns it to the > caller, whose responsibility is to delete it (what the heck???). Even > better, the memory is deleted in a call to TcrMessage::setData, so not even > in the same class. If this memory was a std::vector<int8_t>, we could > probably take advantage of move semantics and maybe even improve performance > a bit, in addition to avoiding potential leaks and weirdness... -- This message was sent by Atlassian Jira (v8.20.10#820010)