MCPcopy Create free account
hub / github.com/pybind/pybind11 / ~ref

Method ~ref

tests/object.h:104–111  ·  view source on GitHub ↗

Destroy this reference

Source from the content-addressed store, hash-verified

102
103 /// Destroy this reference
104 ~ref() {
105 if (m_ptr) {
106 ((Object *) m_ptr)->decRef();
107 }
108
109 print_destroyed(this);
110 track_destroyed((ref_tag *) this);
111 }
112
113 /// Move another reference into the current one
114 ref &operator=(ref &&r) noexcept {

Callers

nothing calls this directly

Calls 3

print_destroyedFunction · 0.85
track_destroyedFunction · 0.85
decRefMethod · 0.80

Tested by

no test coverage detected