MCPcopy Create free account
hub / github.com/davisking/dlib / ~weak_ptr

Method ~weak_ptr

dlib/smart_pointers/weak_ptr.h:89–105  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

87 }
88
89 ~weak_ptr(
90 )
91 {
92 if (weak_node)
93 {
94 // make note that this weak_ptr is being destroyed
95 weak_node->ref_count -= 1;
96
97 // if this is the last weak_ptr then we should clean up our stuff
98 if (weak_node->ref_count == 0)
99 {
100 if (expired() == false)
101 weak_node->shared_node->weak_node = 0;
102 delete weak_node;
103 }
104 }
105 }
106
107 weak_ptr& operator= (
108 const weak_ptr& r

Callers

nothing calls this directly

Calls

no outgoing calls

Tested by

no test coverage detected