Boost logo

Boost Users :

Subject: Re: [Boost-users] passing a shared pointer
From: Patrick Loney (Patrick.Loney_at_[hidden])
Date: 2010-06-09 10:55:41


> class a

> {

> };

 

> boost::shared_ptr<a> Ptr(new a());

 

> I need to pass this pointer as an argument to function (MyFunc) which
access this as a reference

 

void MyFunc(Ptr ptrToObjWhichWontBeDestroyedWhenOriginalGoesOutOfScope)

{

}

 

******************************************************************************

"This message and any attachments are solely for the intended recipient and may contain confidential and privileged information. If you are not the intended recipient, any disclosure, copying, use, or distribution of the information included in this message and any attachments is prohibited. If you have received this communication in error, please notify us by reply e-mail and immediately and permanently delete this message and any attachments. Thank you."

Interactive Transaction Solutions Ltd (2473364 England)

Registered Office:
Systems House,
Station Approach
Emsworth PO10 7PW

**********************************************************************

This email has been scanned by the MessageLabs Email Security System.
For more information please visit http://www.messagelabs.com/email
______________________________________________________________________



Boost-users list run by williamkempf at hotmail.com, kalb at libertysoft.com, bjorn.karlsson at readsoft.com, gregod at cs.rpi.edu, wekempf at cox.net