Blake Bender created GEODE-10098: ------------------------------------ Summary: 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
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.1#820001)