Details
-
Improvement
-
Status: Open
-
Major
-
Resolution: Unresolved
-
None
-
None
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
- links to