You are viewing a plain text version of this content. The canonical link for it is here.
Posted to dev@thrift.apache.org by "Konrad Grochowski (JIRA)" <ji...@apache.org> on 2014/12/04 22:38:12 UTC

[jira] [Resolved] (THRIFT-2465) TBinaryProtocolT breaks if copied/moved

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

Konrad Grochowski resolved THRIFT-2465.
---------------------------------------
    Resolution: Duplicate
      Assignee: Konrad Grochowski

THRIFT-2874 resolves this issue by removing string_buf pointer

> TBinaryProtocolT breaks if copied/moved
> ---------------------------------------
>
>                 Key: THRIFT-2465
>                 URL: https://issues.apache.org/jira/browse/THRIFT-2465
>             Project: Thrift
>          Issue Type: Bug
>          Components: C++ - Library
>    Affects Versions: 0.9
>            Reporter: Vitali Lovich
>            Assignee: Konrad Grochowski
>
> by virtue of omitting the copy constructor, TBinaryProtocolT gets a default one generated for it which is incorrect since it's potentially managing memory (namely the string_buf_ pointer).
> TBinaryProtocolT should delete/make private the copy constructor & copy assignment operator.
> Under C++11, string_buf_ could be changed to a unique_ptr which would let you use the default move constructor/move assignment operator.  Alternatively under C++11, a move constructor/assignment operator needs to be defined.



--
This message was sent by Atlassian JIRA
(v6.3.4#6332)