Skip to content

Commit ac2d68b

Browse files
addaleaxjasnell
authored andcommitted
src: allow unique_ptrs with custom deleter in memory tracker
PR-URL: nodejs#145 Reviewed-By: James M Snell <[email protected]>
1 parent 0f96dc2 commit ac2d68b

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
@@ -107,9 +107,9 @@ void MemoryTracker::TrackField(const char* edge_name,
107107
}
108108
}
109109

110-
template <typename T>
110+
template <typename T, typename D>
111111
void MemoryTracker::TrackField(const char* edge_name,
112-
const std::unique_ptr<T>& value,
112+
const std::unique_ptr<T, D>& value,
113113
const char* node_name) {
114114
if (value.get() == nullptr) {
115115
return;

src/memory_tracker.h

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -140,9 +140,9 @@ class MemoryTracker {
140140
const char* node_name = nullptr);
141141

142142
// Shortcut to extract the underlying object out of the smart pointer
143-
template <typename T>
143+
template <typename T, typename D>
144144
inline void TrackField(const char* edge_name,
145-
const std::unique_ptr<T>& value,
145+
const std::unique_ptr<T, D>& value,
146146
const char* node_name = nullptr);
147147

148148
template <typename T>

0 commit comments

Comments
 (0)