From fbef307c90a96b39dde1f36f2ebe1f764c18bdd2 Mon Sep 17 00:00:00 2001 From: Matthias Schiffer Date: Wed, 9 Feb 2022 21:26:12 +0100 Subject: [PATCH] UniqueCPtr: add doc comment Explain what a UniqueCPtr is. --- src/UniqueCPtr.hpp | 4 +++- 1 file changed, 3 insertions(+), 1 deletion(-) diff --git a/src/UniqueCPtr.hpp b/src/UniqueCPtr.hpp index 647f7e1..743a712 100644 --- a/src/UniqueCPtr.hpp +++ b/src/UniqueCPtr.hpp @@ -10,7 +10,9 @@ #include #include - +// UniqueCPtr is a wrapper around std::unique_ptr using std::free as its deallocator +// +// This allows to use it to manage memory allocated by C APIs (malloc, realloc, ...) template class UniqueCPtr : public std::unique_ptr { public: UniqueCPtr() : std::unique_ptr(nullptr, std::free) {}