From 2e224420e97b3f055c4304489f30202faf8461ee Mon Sep 17 00:00:00 2001 From: Jidong Xiao Date: Fri, 18 Apr 2025 03:09:55 -0400 Subject: [PATCH] adding the print age line --- lectures/27_garbage_collection/README.md | 5 +++++ 1 file changed, 5 insertions(+) diff --git a/lectures/27_garbage_collection/README.md b/lectures/27_garbage_collection/README.md index db7c272..370d025 100644 --- a/lectures/27_garbage_collection/README.md +++ b/lectures/27_garbage_collection/README.md @@ -369,5 +369,10 @@ int main(){ // the shared_ptr itself is now empty (i.e., it holds nullptr). age.reset(); std::cout << "the use count is : " << age.use_count() << std::endl; + + // question: what happens if we print age here: + // std::cout << "age is " << *age << std::endl; + + return 0; } ```