Lines Matching refs:p_
17 SmartPointerBase() : p_(NULL) {} in SmartPointerBase()
20 explicit SmartPointerBase(T* ptr) : p_(ptr) {} in SmartPointerBase()
24 SmartPointerBase(const SmartPointerBase<Deallocator, T>& rhs) : p_(rhs.p_) { in SmartPointerBase()
25 const_cast<SmartPointerBase<Deallocator, T>&>(rhs).p_ = NULL; in SmartPointerBase()
28 T* operator->() const { return p_; }
30 T& operator*() const { return *p_; }
32 T* get() const { return p_; } in get()
35 T& operator[](size_t i) { return p_[i]; }
38 const T& operator[](size_t i) const { return p_[i]; }
49 T* temp = p_; in Detach()
50 p_ = NULL; in Detach()
55 DCHECK(p_ == NULL || p_ != new_value); in Reset()
56 if (p_) Deallocator::Delete(p_); in Reset()
57 p_ = new_value; in Reset()
66 T* tmp = rhs.p_; // swap to handle self-assignment
67 const_cast<SmartPointerBase<Deallocator, T>&>(rhs).p_ = NULL;
68 p_ = tmp;
72 bool is_empty() const { return p_ == NULL; } in is_empty()
79 if (p_) Deallocator::Delete(p_); in ~SmartPointerBase()
83 T* p_;