ancher-bohdan / ancher-bohdan/gl_cpp_course
Problem with deallocation of custom_string instance, which was copied
Đang mở
bug
- Ngôn ngữ chính
- C++
- Star
- 0
- Fork
- 0
- Chỉ số merge pull request
- Không có pull request nào được merge trong 30 ngày
Mô tả
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
Hướng dẫn đóng góp
Chưa lập chỉ mục được hướng dẫn đóng góp cho kho mã nguồn này
Đánh giá
Issue này chưa được đánh giá.