]> sigrok.org Git - libsigrok.git/commit
C++: Replace custom deleters with std::default_delete
authorDaniel Elstner <redacted>
Thu, 15 Oct 2015 17:21:28 +0000 (19:21 +0200)
committerDaniel Elstner <redacted>
Mon, 26 Oct 2015 05:45:56 +0000 (06:45 +0100)
commita98729a742ebbb9df9dbb9ce8aae1cc4c3f1e00d
tree1d4181a73828f52b0ced0649b8d93898f2d2f2cc
parentf17b45465500f1d1aad58479802018949004cce5
C++: Replace custom deleters with std::default_delete

Replace custom Deleter classes with std::default_delete<>, declared
as friend so it can invoke the private destructor. Inexplicably,
std::shared_ptr<> does not use default_delete<> by default, so it
is still necessary to explicitly specify the deleter when creating
shared_ptr instances.

With this, unique_ptr and shared_ptr instances now use the same
default delete mechanism.
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp