Skip to content
This repository was archived by the owner on Aug 11, 2020. It is now read-only.

Commit ad9d240

Browse files
committed
src: allow unique_ptrs with custom deleter in memory tracker
PR-URL: #145 Reviewed-By: James M Snell <[email protected]>
1 parent 76cbb66 commit ad9d240

File tree

2 files changed

+4
-4
lines changed

2 files changed

+4
-4
lines changed

src/memory_tracker-inl.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -99,9 +99,9 @@ void MemoryTracker::TrackField(const char* edge_name,
9999
}
100100
}
101101

102-
template <typename T>
102+
template <typename T, typename D>
103103
void MemoryTracker::TrackField(const char* edge_name,
104-
const std::unique_ptr<T>& value,
104+
const std::unique_ptr<T, D>& value,
105105
const char* node_name) {
106106
if (value.get() == nullptr) {
107107
return;

src/memory_tracker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -136,9 +136,9 @@ class MemoryTracker {
136136
size_t size,
137137
const char* node_name = nullptr);
138138
// Shortcut to extract the underlying object out of the smart pointer
139-
template <typename T>
139+
template <typename T, typename D>
140140
inline void TrackField(const char* edge_name,
141-
const std::unique_ptr<T>& value,
141+
const std::unique_ptr<T, D>& value,
142142
const char* node_name = nullptr);
143143

144144
template <typename T>

0 commit comments

Comments
 (0)