M
Marcin Vorbrodt
A source function is a one that returns an auto_ptr object. A sink function
is one that takes auto_ptr as a parameter. So:
void Source(auto_ptr<SomeClass> aptr);
This will transfer the ownership correctly. How about this:
void Source(auto_ptr<SomeClass> & aptr);
Passing it as reference (non-const) should still do the trick, right?
Is there an advantage to doing so? Speed-wise I mean?
Martin
is one that takes auto_ptr as a parameter. So:
void Source(auto_ptr<SomeClass> aptr);
This will transfer the ownership correctly. How about this:
void Source(auto_ptr<SomeClass> & aptr);
Passing it as reference (non-const) should still do the trick, right?
Is there an advantage to doing so? Speed-wise I mean?
Martin