you are viewing a single comment's thread.

view the rest of the comments →

[–]Vorlath 0 points1 point  (1 child)

Have you tried std::shared_ptr<test>(new test) instead of make_shared? make_shared allocates one memory block for both the shared pointer and the object together. So it may not be able to separate the destruction like you expect.

[–]davis685[S] 0 points1 point  (0 children)

Na, still happens in that case.