Closed werto87 closed 1 year ago
This is api breaking
You mean, because it makes blobs non-copyable? To me that appears more like a bug fix than a realy API break (given that right now everyone who performed a copy will have a double-free and thus a bug in their code)
Yes, I agree that in this case we should break compatibility because not compiling is better than compiling and crashing during run-time.
Using smart-pointers is not possible though, as we currently still support pre-CXX11 standards. But it can still be done.
4.1.0 is supposed to require C++14, see #907. I just never got around actually removing C++98 support from the code yet.
Ah well - I already implemented in a compatible way anyway :shrug:
Blob has no explicit copy/move constructor but a destructor which calls delete. So making a copy/move can result in double free or use after free. example:
Possible solution: remove destructor of blob and replace "details::blobbackend * backEnd;" with std::unique_ptr < details::blobbackend > backEnd;
Problem: This is api breaking