Context: |
See Reference Counting idiom. |
||||||
Challenges: |
|
||||||
Skill: |
|||||||
Participants: |
|
||||||
Signature: |
Smart Pointers share Smart Pointer Counter, which contains the Resource. Smart Pointer and Smart Pointer Counter are parameterized on Resource. (Smart Pointer Counter's declaration may nest in Smart Pointer). Nothing is required of the Resource (besides enabling deletion). Client contains Smart Pointer (rather than Resource). |
||||||
Used patterns and idioms: |
Reference Counting idiom. |
||||||
Scope: |
Languages that do not support automatic garbage collection and support value addressing. |