|
-
November 12th, 2003, 10:00 AM
#15
Code:
FOO_SMART_PTR& FOO_SMART_PTR::operator=(const FOO_SMART_PTR& ptr)
{
if(this != &ptr)
{
dispose();
m_pFOO = ptr.m_pFOO;
*m_RefCount = InterlockedIncrement(ptr.m_RefCount);
}
return *this;
}
Something I do not understand:
Why a dispose here ?
By the way I found the boost reference counted smart pointer: its name is "shared_ptr":
http://www.boost.org/libs/smart_ptr/shared_ptr.htm
Posting Permissions
- You may not post new threads
- You may not post replies
- You may not post attachments
- You may not edit your posts
-
Forum Rules
|
Click Here to Expand Forum to Full Width
|