shared_ptr and weak_ptr differences
Let me repeat your question: “My question, how cyclic data structures makes reference count above zero, kindly request to show with example in C++ program. How the problem is solved by weak_ptrs again with example please.” The problem occurs with C++ code like this (conceptually): class A { shared_ptr<B> b; … }; class B { … Read more