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

Method ~shared_ptr

dlib/smart_pointers/shared_ptr.h:183–205  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

181 }
182
183 ~shared_ptr()
184 {
185 if ( shared_node != 0)
186 {
187 if (shared_node->ref_count == 1)
188 {
189 // delete the data in the appropriate way
190 shared_node->del->del(data);
191 delete shared_node->del;
192
193 // notify any weak_ptrs that the data has now expired
194 if (shared_node->weak_node)
195 shared_node->weak_node->shared_node = 0;
196
197 // finally delete the shared_node
198 delete shared_node;
199 }
200 else
201 {
202 shared_node->ref_count -= 1;
203 }
204 }
205 }
206
207 shared_ptr(
208 const shared_ptr& r

Callers

nothing calls this directly

Calls 1

delMethod · 0.45

Tested by

no test coverage detected