Skip to content

Commit

Permalink
src: allow unique_ptrs with custom deleter in memory tracker
Browse files Browse the repository at this point in the history
PR-URL: nodejs#145
Reviewed-By: James M Snell <jasnell@gmail.com>
  • Loading branch information
addaleax authored and juanarbol committed Dec 17, 2019
1 parent d3869f1 commit 7bace89
Show file tree
Hide file tree
Showing 2 changed files with 0 additions and 15 deletions.
10 changes: 0 additions & 10 deletions src/memory_tracker-inl.h
Original file line number Diff line number Diff line change
Expand Up @@ -109,16 +109,6 @@ void MemoryTracker::TrackField(const char* edge_name,
TrackField(edge_name, value.get(), node_name);
}

template <typename T>
void MemoryTracker::TrackField(const char* edge_name,
const std::shared_ptr<T>& value,
const char* node_name) {
if (value.get() == nullptr) {
return;
}
TrackField(edge_name, value.get(), node_name);
}

template <typename T, bool kIsWeak>
void MemoryTracker::TrackField(const char* edge_name,
const BaseObjectPtrImpl<T, kIsWeak>& value,
Expand Down
5 changes: 0 additions & 5 deletions src/memory_tracker.h
Original file line number Diff line number Diff line change
Expand Up @@ -140,11 +140,6 @@ class MemoryTracker {
inline void TrackField(const char* edge_name,
const std::unique_ptr<T, D>& value,
const char* node_name = nullptr);

template <typename T>
inline void TrackField(const char* edge_name,
const std::shared_ptr<T>& value,
const char* node_name = nullptr);
template <typename T, bool kIsWeak>
void TrackField(const char* edge_name,
const BaseObjectPtrImpl<T, kIsWeak>& value,
Expand Down

0 comments on commit 7bace89

Please sign in to comment.