Computer Science, asked by pandu6357, 11 months ago

How to create instance of a class using shared pointer?

Answers

Answered by Anonymous
1

Answer:

In your case you get to shared pointers that have two different ownership information blocks but always increment the ref count of the first shared pointer instance of the class.

If you remove the 'fake deleter' you'l get a double free problem.

Similar questions