Lines Matching defs:p_
31 explicit scoped_ptr(T * p = 0) : p_(p) {}
32 ~scoped_ptr() { delete p_; }
35 if (p == p_)
37 delete p_;
38 p_ = p;
41 T & operator*() const { return *p_; }
42 T * operator->() const { return p_; }
43 T * get() const { return p_; }
46 T * tmp = sp.p_;
47 sp.p_ = p_;
48 p_ = tmp;
54 T * p_;
59 explicit scoped_array(T * p = 0) : p_(p) {}
60 ~scoped_array() { delete [] p_; }
63 if (p == p_)
65 delete [] p_;
66 p_ = p;
69 T & operator[](std::ptrdiff_t i) const { return p_[i]; }
70 T * get() const { return p_; }
73 T * tmp = sp.p_;
74 sp.p_ = p_;
75 p_ = tmp;
81 T * p_;