Lines Matching refs:shared_ptr
272 class shared_ptr { class
277 shared_ptr() : p(0), control(0) {} in shared_ptr() function in reference_count::shared_ptr
278 explicit shared_ptr(T *p) : p(p), control(new control_block) { in shared_ptr() function in reference_count::shared_ptr
281 shared_ptr(shared_ptr &other) : p(other.p), control(other.control) { in shared_ptr() function in reference_count::shared_ptr
285 ~shared_ptr() { in ~shared_ptr()
296 void swap(shared_ptr &other) { in swap()
308 shared_ptr<int> a(new int); in testSingle()
313 shared_ptr<int> a(new int); in testDouble()
314 shared_ptr<int> b = a; in testDouble()
319 shared_ptr<int> a(new int); in testInvalidated()
320 shared_ptr<int> b = a; in testInvalidated()
323 extern void use(shared_ptr<int> &); in testInvalidated()
328 shared_ptr<int> a(new int); in testNestedScope()
330 shared_ptr<int> b = a; in testNestedScope()
336 shared_ptr<int> a(new int); in testSwap()
337 shared_ptr<int> b; in testSwap()
338 shared_ptr<int> c = a; in testSwap()
339 shared_ptr<int>(c).swap(b); in testSwap()
345 shared_ptr<int> a(p); in testUseAfterFree()
346 shared_ptr<int> b = a; in testUseAfterFree()