First
Previous
Next
Last
Index
Home
Text
Slide 37 of 38
Notes:
There are a number of possible ways to implement counted_ptr…
Prevent the constructor throwing exceptions (at the cost of possible exceptions in copy ops - e.g. assignment)
The constructor throws, and the user code is responsible for deleting the T.
Should an exception occur, then the counted_ptr deletes the T.