
11 Aug
2010
11 Aug
'10
7:31 p.m.
I use shared_ptr like a "poor-man's" garbage collection. Instead of having
Ahh, being a c++ developer I see garbage collection as a poor man's raii (you can't even control when something is destructed for gods' sake ;))
Perhaps, but shared_ptr's may fail here either. Atm shared_ptr to object being constructed (thru enable_shared_from_this) cant be dealt out in constructors which make it impossible to build parent child relation ships at constructor time if the child needs a weak_ptr to parent.