
18 May
2008
18 May
'08
4:55 a.m.
It gets initialized by the shared_ptr constructor.
Frank, when I call user_count() on the _internal_weak_ptr before calling share_from_this() I get back 1. So are you referring to the first shared_ptr constructor in main() (vs the constructor in share_from_this())? If so how is it initialized? The shared_ptr constructor gets passed a reference to the object being pointed, are you saying it goes and searches out for _internal_weak_ptr within that object and initializes it if it finds it? thanks jose "survival first, then happiness as we can manage it"