ancher-bohdan / ancher-bohdan/gl_cpp_course

Problem with deallocation of custom_string instance, which was copied

オープン
#1 コメント 0 件 リアクション 0 件 担当者 1 名 @ancher-bohdan が担当を希望しています GitHub で見る
bug
主要言語
C++
スター
0
フォーク
0
PR マージ指標
30日以内にマージされた PR はありません

説明

Some function (insert, append , = [assign operator]) might reallocate internal char buffer. If it happens with instance, witch was copied, in copy there was stale pointer to memory area, witch was already deallocaded. This cause a problem during deallocation of copy.

Need to fix this

Possible solution:
* Add additional field, witch contains reference counter to internal buffer.
* Use smart pointer instead of a usual one

コントリビューションガイド

このリポジトリのコントリビューションガイドは索引されていません

評価

この issue はまだ評価されていません。

新しい issue をメールで受け取る

初心者向けの GitHub issue を短くまとめたダイジェスト。