Uploaded image for project: 'Geode'
  1. Geode
  2. GEODE-10098

TcrConnection::readMessage should not be explicitly allocating memory

    XMLWordPrintableJSON

Details

    Description

      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...

      Attachments

        Issue Links

          Activity

            People

              Unassigned Unassigned
              bbender Blake Bender
              Votes:
              0 Vote for this issue
              Watchers:
              2 Start watching this issue

              Dates

                Created:
                Updated: