Lines Matching refs:ptr_
92 explicit scoped_ptr(C* p = NULL) : ptr_(p) { } in ptr_() function
98 delete ptr_; in ~scoped_ptr() local
105 if (p != ptr_) {
107 delete ptr_; variable
108 ptr_ = p;
115 assert(ptr_ != NULL);
116 return *ptr_;
119 assert(ptr_ != NULL);
120 return ptr_;
122 C* get() const { return ptr_; } in get()
127 bool operator==(C* p) const { return ptr_ == p; }
128 bool operator!=(C* p) const { return ptr_ != p; }
132 C* tmp = ptr_; in swap()
133 ptr_ = p2.ptr_; in swap()
134 p2.ptr_ = tmp; in swap()
143 C* retVal = ptr_; in release()
144 ptr_ = NULL; in release()
149 C* ptr_;
307 explicit scoped_ptr_malloc(C* p = NULL): ptr_(p) {} in ptr_() function
318 if (ptr_ != p) {
320 free_proc(ptr_);
321 ptr_ = p;
329 assert(ptr_ != NULL);
330 return *ptr_;
334 assert(ptr_ != NULL);
335 return ptr_;
339 return ptr_; in get()
348 return ptr_ == p;
352 return ptr_ != p;
357 C* tmp = b.ptr_; in swap()
358 b.ptr_ = ptr_; in swap()
359 ptr_ = tmp; in swap()
368 C* tmp = ptr_; in release()
369 ptr_ = NULL; in release()
374 C* ptr_;