]> sigrok.org Git - libsigrok.git/commit
C++: Use smart pointers instead of manual delete
authorDaniel Elstner <redacted>
Thu, 15 Oct 2015 16:32:44 +0000 (18:32 +0200)
committerDaniel Elstner <redacted>
Mon, 26 Oct 2015 05:45:56 +0000 (06:45 +0100)
commitf17b45465500f1d1aad58479802018949004cce5
treec42e22ccc7c1a43d362ea5e9e27ac5a3223de802
parentd5d7b09eb76de71a42b780b97aee5f5019d2d799
C++: Use smart pointers instead of manual delete

Make use of std::unique_ptr<> to manage the lifetime of members
or container elements, so that manual invocations of delete can
be avoided. This also provides for exception safety.

Since std::unique_ptr<> is only movable but not copyable, adapt
the code to avoid copies and assignments of these pointers.
bindings/cxx/classes.cpp
bindings/cxx/include/libsigrokcxx/libsigrokcxx.hpp