Smart Pointer
Smart Pointer
https://docs.microsoft.com/en-us/cpp/cpp/smart-pointers-modern-cpp?view=vs-2019
Using pointer to create object
Problem with pointers
When instance count reaches 0, the object is destroyed and its memory deallocated
Question
==> weak_ptr
Creating weak_ptr
Using weak_ptr for iterating