Patchouli
帕秋莉的魔法筆記

帕秋莉的魔法筆記

Follow
Follow
homeWAY TO CPP11🚗PROBLEM SOLUTION
Tag

smart pointer

#smart-pointer

More content

Read more stories on Hashnode


Articles with this tag

std::enable_shared_from_this

Nov 6, 20232 min read

取得自己的 shared pointer · 目標 在 class 的 member function 裡面取得自己的 shared_ptr 或(weak_ptr)。 Example: 把底下的 code 轉成用智慧指標來管理記憶體的版本 struct Node; struct Node { ...

std::enable_shared_from_this