For example:
class A
{
public:
virtual ~A()
{
}
int x;
};
typedef boost::shared_ptr<A> APtr;
APtr getA();
APtr getA()
{
return APtr(new A());
}
A::A()
{
x = 0;
}
When ever I call APtr getA() will every instance of shared_ptr will see x as
0?
Regards,
Prakash
________________________________
From: Satya Prasad <[email protected]>
To: [email protected]
Sent: Saturday, March 21, 2009 10:15:19 AM
Subject: Shaerd pointer
Hi All,
I would like to know that incase of shared pointer if one reference modifies a
value of an object will the other one will the modified values? How can we
ensure that two instance of shared pointers if change object values, each of
them retains its original? Is that possible using shared pointer.
Regards,
Prakash
[Non-text portions of this message have been removed]