From e68d4c6f5f6086c2816ed6d870e23e824c661f92 Mon Sep 17 00:00:00 2001 From: Anna Henningsen Date: Tue, 1 Oct 2019 21:58:12 +0200 Subject: [PATCH] src: allow unique_ptrs with custom deleter in memory tracker Originally landed in the QUIC repo Original review metadata: ``` PR-URL: https://github.com/nodejs/quic/pull/145 Reviewed-By: James M Snell ``` PR-URL: https://github.com/nodejs/node/pull/31870 Reviewed-By: Anna Henningsen Reviewed-By: David Carlier Reviewed-By: Joyee Cheung Reviewed-By: Denys Otrishko Reviewed-By: Colin Ihrig --- src/memory_tracker-inl.h | 4 ++-- src/memory_tracker.h | 4 ++-- 2 files changed, 4 insertions(+), 4 deletions(-) diff --git a/src/memory_tracker-inl.h b/src/memory_tracker-inl.h index 1a28e2dd792747..9e6201442ab6b1 100644 --- a/src/memory_tracker-inl.h +++ b/src/memory_tracker-inl.h @@ -107,9 +107,9 @@ void MemoryTracker::TrackField(const char* edge_name, } } -template +template void MemoryTracker::TrackField(const char* edge_name, - const std::unique_ptr& value, + const std::unique_ptr& value, const char* node_name) { if (value.get() == nullptr) { return; diff --git a/src/memory_tracker.h b/src/memory_tracker.h index 616976ab2afab1..4a66e9ce74ccc5 100644 --- a/src/memory_tracker.h +++ b/src/memory_tracker.h @@ -140,9 +140,9 @@ class MemoryTracker { const char* node_name = nullptr); // Shortcut to extract the underlying object out of the smart pointer - template + template inline void TrackField(const char* edge_name, - const std::unique_ptr& value, + const std::unique_ptr& value, const char* node_name = nullptr); template