strong pointer implementation of android

405 views
Skip to first unread message

Ubuntu guy

unread,
May 7, 2010, 6:26:51 PM5/7/10
to android-platform
Hi,

I had a look at RefBase.h and its implementation of strong pointer.
Does that mean the type that i'm trying to use with sp has to always
be inherited from RefBase? (so that it has its own incStrong, which
can be invoked by sp's constructor?)

template<typename T>
sp<T>::sp(T* other)
: m_ptr(other)
{
if (other) other->incStrong(this);
}

--
You received this message because you are subscribed to the Google Groups "android-platform" group.
To post to this group, send email to android-...@googlegroups.com.
To unsubscribe from this group, send email to android-platfo...@googlegroups.com.
For more options, visit this group at http://groups.google.com/group/android-platform?hl=en.

David Turner

unread,
May 7, 2010, 7:44:00 PM5/7/10
to android-...@googlegroups.com
Yes :-)
Reply all
Reply to author
Forward
0 new messages