Given the following:
class ParamClass {...};
class MyObject {
public:
void myMethod(ParamClass const& param) { _myPrivate = param; }
private:
ParamClass _myPrivate;
}
[...]
MyObject obj;
void some_function(void)
{
ParamClass p(...);
obj.myMethod(p);
}
What will happen to _myPrivate at the end of the lifetime of object p? EDIT: will I still be able to use _myPrivate to access a copy of object p?
Thanks!
Dan