Home | History | Annotate | Download | only in memory

Lines Matching defs:scoped_nsobject

13 // scoped_nsobject<> is patterned after scoped_ptr<>, but maintains ownership
18 // When scoped_nsobject<> takes ownership of an object (in the constructor or
20 // caller must own the object it gives to scoped_nsobject<>, and relinquishes
21 // an ownership claim to that object. scoped_nsobject<> does not call
24 // scoped_nsobject<> is not to be used for NSAutoreleasePools. For
27 // We check for bad uses of scoped_nsobject and NSAutoreleasePool at compile
30 class scoped_nsobject {
34 explicit scoped_nsobject(NST* object = nil)
38 ~scoped_nsobject() {
45 // scoped_nsobject and ScopedCFTypeRef, whether it's in the constructor or
63 void swap(scoped_nsobject& that) {
69 // scoped_nsobject<>::release() is like scoped_ptr<>::release. It is NOT
70 // a wrapper for [object_ release]. To force a scoped_nsobject<> object to
71 // call [object_ release], use scoped_nsobject<>::reset().
81 DISALLOW_COPY_AND_ASSIGN(scoped_nsobject);
86 void swap(scoped_nsobject<C>& p1, scoped_nsobject<C>& p2) {
91 bool operator==(C* p1, const scoped_nsobject<C>& p2) {
96 bool operator!=(C* p1, const scoped_nsobject<C>& p2) {
101 // Specialization to make scoped_nsobject<id> work.
103 class scoped_nsobject<id> {
107 explicit scoped_nsobject(id object = nil)
111 ~scoped_nsobject() {
118 // scoped_nsobject and ScopedCFTypeRef, whether it's in the constructor or
136 void swap(scoped_nsobject& that) {
142 // scoped_nsobject<>::release() is like scoped_ptr<>::release. It is NOT
143 // a wrapper for [object_ release]. To force a scoped_nsobject<> object to
144 // call [object_ release], use scoped_nsobject<>::reset().
154 DISALLOW_COPY_AND_ASSIGN(scoped_nsobject);
157 // Do not use scoped_nsobject for NSAutoreleasePools, use
161 class scoped_nsobject<NSAutoreleasePool> {
163 explicit scoped_nsobject(NSAutoreleasePool* object = nil);
164 DISALLOW_COPY_AND_ASSIGN(scoped_nsobject);