Opened 16 years ago

Closed 16 years ago

#855 closed Feature Requests (Rejected)

provide detach() function for shared pointer

Reported by: nobody Owned by: Peter Dimov
Milestone: Component: smart_ptr
Version: None Severity:
Keywords: Cc:

Description

I suggest that we should provide a new method T* detachPtr() for shared_ptr to let the shared_ptr pass owner ship to other fuctions or applications. 

It is a comman case that user will have to let the share_ptr give up the owenership of the objec, pass the object to other application let that application take care the objcet's life. But there is no method to do so.


Change History (1)

comment:1 by Peter Dimov, 16 years ago

Status: assignedclosed
Logged In: YES 
user_id=305912
Originator: NO

There are no plans to add a release() member to shared_ptr at this time; this is in the FAQ.
Note: See TracTickets for help on using tickets.