mirror of
https://github.com/neocturne/MinedMap.git
synced 2025-03-04 17:23:33 +01:00
UniqueCPtr: add doc comment
Explain what a UniqueCPtr is.
This commit is contained in:
parent
3160b59cdd
commit
fbef307c90
1 changed files with 3 additions and 1 deletions
|
@ -10,7 +10,9 @@
|
|||
#include <cstdlib>
|
||||
#include <memory>
|
||||
|
||||
|
||||
// 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<typename T> class UniqueCPtr : public std::unique_ptr<T, void (*)(void *)> {
|
||||
public:
|
||||
UniqueCPtr() : std::unique_ptr<T, void (*)(void *)>(nullptr, std::free) {}
|
||||
|
|
Loading…
Add table
Reference in a new issue