Closed phprus closed 2 years ago
@gulrak, I am sorry to distract you. When you have time, please review this PR.
Thank you! I'll look into it this evening and as far as I can see it will be in 1.5.10. - I Needed to delay that release due to time constrains but really plan finishing it over the weekend, as I'm starting to now have a bit more time at my hands again.
Nice, thank you! My only issue might be the different member marking style in the new helper class, but I can fix that when I wrap up the release.
1) Apply clang-format 2) Replace
std::shared_ptr
tostd::unique_ptr
becausestd::unique_ptr
does not use reference counter. 3) Replacestd::shared_ptr<void>
(for storing handle) to custom unique_handle class becausestd::shared_ptr
use reference counter.In all cases, a reference count is not needed, since the stored object exists in a single instance.
Replace
std::shared_ptr<void>
tostd::unique_ptr
is wrong, becausestd::unique_ptr
doesn't call deleter on zero pointer and zero - is valid handle value.