SharedObject WeakRef::shared() { SharedObject ret; if (alive()) { ret.assignNode((*this)->raw_); } return ret; }
SharedObject SharedObject::clone() const { SharedObject ret; if (!isNull()) { ret.assignNode((*this)->clone()); } return ret; }
void loadDll(const char *name) { SharedObject *so = new SharedObject; so->load(name, true); }
WeakRef::WeakRef(SharedObject shared) { assignNode(shared.weak()->get()); }
LoadedObject(const char * name) { so.load(name, true); }
void PassAccessorThread(SharedObject<int>::Accessor& acc){ ASSERT_EQ(1, acc.access()); }