Difference between revisions of "CSmartPtr"

From Valve Developer Community
Jump to: navigation, search
m
(removed {{orphan}}. this page is now linked to on all pages mentioning it)
 
Line 1: Line 1:
{{orphan}}
 
 
Smart [[pointer]]s can be used to automatically free an object when nobody points at it anymore. Things contained in smart pointers must implement [[AddRef]] and Release functions. If those functions are private, then the class must make [[CRefCountAccessor]] a friend.
 
Smart [[pointer]]s can be used to automatically free an object when nobody points at it anymore. Things contained in smart pointers must implement [[AddRef]] and Release functions. If those functions are private, then the class must make [[CRefCountAccessor]] a friend.
 
[[Category:Helpers]]
 
[[Category:Helpers]]

Latest revision as of 11:26, 13 August 2018

Smart pointers can be used to automatically free an object when nobody points at it anymore. Things contained in smart pointers must implement AddRef and Release functions. If those functions are private, then the class must make CRefCountAccessor a friend.