Lines Matching refs:Bar
95 // 2 strong references. Bar destructor checks that there are no early
97 class Bar : public RefBase {
99 Bar(std::atomic<int>* delete_count) : mVisited1(false), mVisited2(false),
103 ~Bar() {
114 static sp<Bar> buffer;
176 Bar* bar = new Bar(&deleteCount);
177 sp<Bar> sp3(bar);
180 ASSERT_TRUE(bar->getStrongCount() >= 1);
182 ASSERT_TRUE(bar->getWeakRefs()->getWeakCount() >= 1);
194 static wp<Bar> wpBuffer;
209 sp<Bar> sp1 = wpBuffer.promote();
231 Bar* bar = new Bar(&deleteCount);
232 wp<Bar> wp1(bar);
233 bar->mVisited1 = true;
237 wp1 = bar;
240 ASSERT_EQ(bar->getWeakRefs()->getWeakCount(), 2);
245 sp<Bar> sp1 = wp1.promote();