Thread View: comp.std.c++
1 messages
1 total messages
Started by Gary L. Craig
Thu, 05 Oct 1995 14:56
Re: auto_ptr::reset ...
Author: Gary L. Craig
Date: Thu, 05 Oct 1995 14:56
Date: Thu, 05 Oct 1995 14:56
26 lines
1459 bytes
1459 bytes
A slight aside from the private copy ctor and assignment op debate. Can someone solidify the semantics of: X* auto_ptr<X>reset(X* ptr = 0) In the DWP, the only postconditions are that get() == ptr. However, shouldn't any previous held object be released first? Must a new auto_ptr be created for each newly aquired resource? I see reset as a deallocate function + optional rebind to new resource! Is this correct? -- Gary L. Craig phone: (315) 443-5936 Superlative Software Solutions, Inc. FAX: (315) 443-4745 2-212 Center for Science and Technology email: craig@cat.syr.edu Syracuse University Syracuse, NY 13244-4100 http://www.cat.syr.edu/~craig [ comp.std.c++ is moderated. Submission address: std-c++@ncar.ucar.edu. Contact address: std-c++-request@ncar.ucar.edu. The moderation policy is summarized in http://dogbert.lbl.gov/~matt/std-c++/policy.html. ]
Thread Navigation
This is a paginated view of messages in the thread with full content displayed inline.
Messages are displayed in chronological order, with the original post highlighted in green.
Use pagination controls to navigate through all messages in large threads.
Back to All Threads