
18 May
2008
18 May
'08
4:10 a.m.
In the shared_from_this() function of the enable_shared_from_this base class, the weak pointer _internal_weak_this is never initialized. Why is that so? The use_count of the _internal_weak_ptr is at least 1 as long as there is a shared_ptr already pointing to *this. How does the un-initialized weak_ptr know that there is a shared_ptr already created and how can it access the number of references? I'm sure there is a simple explanation that I am not catching in my readings. thanks jose "survival first, then happiness as we can manage it"