You are viewing a plain text version of this content. The canonical link for it is here.
Posted to issues@geode.apache.org by "ASF GitHub Bot (Jira)" <ji...@apache.org> on 2022/03/04 19:28:00 UTC

[jira] [Updated] (GEODE-10098) TcrConnection::readMessage should not be explicitly allocating memory

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

ASF GitHub Bot updated GEODE-10098:
-----------------------------------
    Labels: pull-request-available  (was: )

> 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.1#820001)