
21 Apr
2009
21 Apr
'09
8:55 p.m.
Mathias Gaunard wrote:
Achilleas Margaritis wrote:
I even wonder how gc_ptr<T>::gc_ptr::(T*) can be a safe constructor at all.
What do you mean exactly?
What if I do something like
Foo foo; gc_ptr<Foo> bar = &foo;
?
It's ok, nothing will happen. The collector, as it is stated in the readme, recognizes garbage-collected blocks. If a gc ptr points to a non-gc object, then the ptr is simply ignored.