How to create instance of a class using shared pointer?
Answers
Answered by
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