Home | History | Annotate | Download | only in memory

Lines Matching defs:scoped_refptr

180 //     scoped_refptr<MyFoo> foo = new MyFoo();
186 // scoped_refptr<MyFoo> foo = new MyFoo();
194 // The above examples show how scoped_refptr<T> acts like a pointer to T.
195 // Given two scoped_refptr<T> classes, it is also possible to exchange
199 // scoped_refptr<MyFoo> a = new MyFoo();
200 // scoped_refptr<MyFoo> b;
210 // scoped_refptr<MyFoo> a = new MyFoo();
211 // scoped_refptr<MyFoo> b;
218 class scoped_refptr {
220 scoped_refptr() : ptr_(NULL) {
223 scoped_refptr(T* p) : ptr_(p) {
228 scoped_refptr(const scoped_refptr<T>& r) : ptr_(r.ptr_) {
234 scoped_refptr(const scoped_refptr<U>& r) : ptr_(r.get()) {
239 ~scoped_refptr() {
259 scoped_refptr<T>& operator=(T* p) {
270 scoped_refptr<T>& operator=(const scoped_refptr<T>& r) {
275 scoped_refptr<T>& operator=(const scoped_refptr<U>& r) {
285 void swap(scoped_refptr<T>& r) {
293 // Handy utility for creating a scoped_refptr<T> out of a T* explicitly without
296 scoped_refptr<T> make_scoped_refptr(T* t) {
297 return scoped_refptr<T>(t);