Lines Matching refs:TestRefObject
89 class TestRefObject : public TestRefObjectBaseA, public TestRefObjectBaseB {
91 TestRefObject()
94 printf(" Creating TestRefObject %p.\n",
98 ~TestRefObject()
100 printf(" Destroying TestRefObject %p.\n",
107 printf(" AddRef to %d on TestRefObject %p.\n",
115 printf(" Release to %d on TestRefObject %p.\n",
118 delete NS_CONST_CAST(TestRefObject*, this);
134 static void CreateTestRefObject(TestRefObject **aResult)
136 (*aResult = new TestRefObject())->AddRef();
151 static void DoSomethingWithTestRefObject(TestRefObject *aIn)
153 printf(" Doing something with |TestRefObject| %p.\n",
157 static void DoSomethingWithConstTestRefObject(const TestRefObject *aIn)
159 printf(" Doing something with |const TestRefObject| %p.\n",
212 printf("Should create and AddRef one |TestRefObject|:\n");
213 nsRefPtr<TestRefObject> pobj( new TestRefObject() );
214 printf("Should Release and destroy one |TestRefObject|:\n");
218 printf("Should create and AddRef one |TestRefObject|:\n");
219 nsRefPtr<TestRefObject> pobj( new TestRefObject() );
220 printf("Should create and AddRef one |TestRefObject| and then Release and destroy one:\n");
221 pobj = new TestRefObject();
222 printf("Should Release and destroy one |TestRefObject|:\n");
226 printf("Should create and AddRef one |TestRefObject|:\n");
227 nsRefPtr<TestRefObject> p1( new TestRefObject() );
228 printf("Should AddRef one |TestRefObject|:\n");
229 nsRefPtr<TestRefObject> p2( p1 );
230 printf("Should Release twice and destroy one |TestRefObject|:\n");
236 nsRefPtr<TestRefObject> p1( new TestRefObject() );
237 nsRefPtr<TestRefObject> p2( p1 );
243 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
244 nsRefPtr<TestRefObject> p2( p1 );
250 nsRefPtr<TestRefObject> p1( new TestRefObject() );
251 const nsRefPtr<TestRefObject> p2( p1 );
257 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
258 const nsRefPtr<TestRefObject> p2( p1 );
264 nsRefPtr<TestRefObject> p1( new TestRefObject() );
265 TestRefObject * p2 = p1;
271 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
272 TestRefObject * p2 = p1;
279 nsRefPtr<TestRefObject> p1( new TestRefObject() );
280 TestRefObject * const p2 = p1;
286 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
287 TestRefObject * const p2 = p1;
294 nsRefPtr<TestRefObject> p1( new TestRefObject() );
295 const TestRefObject * p2 = p1;
301 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
302 const TestRefObject * p2 = p1;
308 nsRefPtr<TestRefObject> p1( new TestRefObject() );
309 const TestRefObject * const p2 = p1;
315 const nsRefPtr<TestRefObject> p1( new TestRefObject() );
316 const TestRefObject * const p2 = p1;
331 nsRefPtr<TestRefObject> ptr;
332 printf("Should create and AddRef one |TestRefObject|:\n");
334 printf("Should Release and destroy one |TestRefObject|:\n");
362 nsRefPtr<TestRefObject> p1 = new TestRefObject();
372 nsRefPtr<TestRefObject> p1 = new TestRefObject();
381 TestRefObject *p1 = new TestRefObject();
422 printf("Should create and AddRef one |TestRefObject|:\n");
423 nsRefPtr<TestRefObject> pobj = new TestRefObject();
424 printf("Should Release and destroy one |TestRefObject|:\n");
454 printf("Should create and AddRef one |TestRefObject|:\n");
455 nsRefPtr<TestRefObject> pobj = new TestRefObject();
456 printf("Should do something with one |TestRefObject|:\n");
458 printf("Should do something with one |TestRefObject|:\n");
460 printf("Should Release and destroy one |TestRefObject|:\n");
488 printf("Should create and AddRef one |TestRefObject|:\n");
489 nsRefPtr<TestRefObject> pobj = new TestRefObject();
490 printf("Should do something with one |TestRefObject|:\n");
492 printf("Should do something with one |TestRefObject|:\n");
494 printf("Should Release and destroy one |TestRefObject|:\n");
522 printf("Should create and AddRef one |TestRefObject|:\n");
523 const nsRefPtr<TestRefObject> pobj = new TestRefObject();
524 printf("Should do something with one |TestRefObject|:\n");
526 printf("Should do something with one |TestRefObject|:\n");
528 printf("Should Release and destroy one |TestRefObject|:\n");
556 printf("Should create and AddRef one |TestRefObject|:\n");
557 const nsRefPtr<TestRefObject> pobj = new TestRefObject();
558 printf("Should do something with one |TestRefObject|:\n");
560 printf("Should do something with one |TestRefObject|:\n");
562 printf("Should Release and destroy one |TestRefObject|:\n");