
20 May
2006
20 May
'06
7:15 p.m.
On 05/20/2006 12:25 PM, Achilleas Margaritis wrote:
How is the precision achieved without compiler support?
The class 'ptr' (used for global and stack pointers) pushes itself in the current collector's stack on construction and removes itself from that stack on destruction. Example:
ptr<Foo> ptr1 = new Foo;
The class 'member_ptr' is registered to the owner object in the owner object's constructor. Example:
class Foo : public object { member_ptr<Foo> next; Foo() : next(this) { } };
[snip] If Foo is on the stack, is Foo::next pushed on current collector's stack? If std::vector<Foo> is on the stack, are all it's contained Foo::next's pushed on the current collector's stack?