mirror of
https://github.com/meshtastic/firmware.git
synced 2025-09-20 16:56:17 +00:00
Document deleter
This commit is contained in:
parent
72d0731fae
commit
abffaf6ff7
@ -56,7 +56,7 @@ template <class T> class Allocator
|
||||
/// std::unique_ptr wrapped variant of allocZeroed(TickType_t maxWait).
|
||||
UniqueAllocation allocUniqueZeroed(TickType_t maxWait) { return UniqueAllocation(allocZeroed(maxWait), deleter); }
|
||||
/// Return a queable object which is a copy of some other object
|
||||
// std::unique_ptr wrapped variant of allocCopy(const T &src, TickType_t maxWait).
|
||||
/// std::unique_ptr wrapped variant of allocCopy(const T &src, TickType_t maxWait).
|
||||
UniqueAllocation allocUniqueCopy(const T &src, TickType_t maxWait = portMAX_DELAY)
|
||||
{
|
||||
return UniqueAllocation(allocCopy(src, maxWait), deleter);
|
||||
@ -70,6 +70,7 @@ template <class T> class Allocator
|
||||
virtual T *alloc(TickType_t maxWait) = 0;
|
||||
|
||||
private:
|
||||
// std::unique_ptr Deleter function; calls release().
|
||||
const std::function<void(T *)> deleter;
|
||||
};
|
||||
|
||||
|
Loading…
Reference in New Issue
Block a user