|
-
August 8th, 2008, 06:07 PM
#1
shared_ptr VS. intrusive_ptr?
What I understand, intrusive_ptr provides better performnce than shared_ptr, but requires the type being refered to provide its own counting mechanism. I can understand that intrusive_ptr is fast and works good, if the object itself can provide that. But how does shared_ptr work? How does it know how many references there is to the same object? Or when deleted, when to delete the object being refered to? If the object being refered to cannot store the number of references, where is it sored?
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
|