Click here to Skip to main content
16,012,028 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionRe: STL memory - delete/de-allocate mem for individual list element?? Pin
Maximilien23-Aug-07 3:04
Maximilien23-Aug-07 3:04 
AnswerRe: STL memory - delete/de-allocate mem for individual list element?? [modified] Pin
jhwurmbach23-Aug-07 3:09
jhwurmbach23-Aug-07 3:09 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
toxcct23-Aug-07 3:39
toxcct23-Aug-07 3:39 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
James R. Twine23-Aug-07 3:50
James R. Twine23-Aug-07 3:50 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
jhwurmbach23-Aug-07 3:50
jhwurmbach23-Aug-07 3:50 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
toxcct23-Aug-07 3:53
toxcct23-Aug-07 3:53 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
devvvy23-Aug-07 13:47
devvvy23-Aug-07 13:47 
GeneralRe: STL memory - delete/de-allocate mem for individual list element?? Pin
jhwurmbach23-Aug-07 21:33
jhwurmbach23-Aug-07 21:33 
devvvy wrote:
Ang good beginner tutorial on Smart Pointer?


Hmm - no, sorry. Google gives a lot of hints with tips, but no concise tutorial.

You construct them like this
boost::shared_ptr<Object> Obj( new Object);
and now use Obj like any pointer to an object: use as function parameters, return from function etc.
At the time when the last copy of the smart_ptr goes out of scope, the contained object is deleted.



Though I speak with the tongues of men and of angels, and have not money, I am become as a sounding brass, or a tinkling cymbal.
George Orwell, "Keep the Aspidistra Flying", Opening words

AnswerRe: STL memory - delete/de-allocate mem for individual list element?? Pin
David Crow23-Aug-07 3:19
David Crow23-Aug-07 3:19 
GeneralIs this how? ACTION 1/2/3/4/5?? [modified] Pin
devvvy23-Aug-07 15:43
devvvy23-Aug-07 15:43 
GeneralRe: Is this how? ACTION 1/2/3/4/5?? Pin
David Crow24-Aug-07 5:14
David Crow24-Aug-07 5:14 
QuestionHow to generate GUID. Pin
veer_in23-Aug-07 2:43
veer_in23-Aug-07 2:43 
AnswerRe: How to generate GUID. Pin
David Crow23-Aug-07 2:51
David Crow23-Aug-07 2:51 
QuestionRe: How to generate GUID. Pin
veer_in23-Aug-07 3:07
veer_in23-Aug-07 3:07 
AnswerRe: How to generate GUID. Pin
David Crow23-Aug-07 3:18
David Crow23-Aug-07 3:18 
QuestionRe: How to generate GUID. Pin
veer_in23-Aug-07 3:21
veer_in23-Aug-07 3:21 
AnswerRe: How to generate GUID. Pin
David Crow23-Aug-07 3:33
David Crow23-Aug-07 3:33 
GeneralRe: How to generate GUID. [modified] Pin
veer_in23-Aug-07 4:00
veer_in23-Aug-07 4:00 
GeneralRe: How to generate GUID. Pin
David Crow23-Aug-07 4:27
David Crow23-Aug-07 4:27 
GeneralRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 4:47
jhwurmbach23-Aug-07 4:47 
AnswerRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 2:53
jhwurmbach23-Aug-07 2:53 
QuestionRe: How to generate GUID. Pin
veer_in23-Aug-07 3:04
veer_in23-Aug-07 3:04 
AnswerRe: How to generate GUID. Pin
jhwurmbach23-Aug-07 3:08
jhwurmbach23-Aug-07 3:08 
AnswerRe: How to generate GUID. Pin
Waldermort23-Aug-07 8:36
Waldermort23-Aug-07 8:36 
AnswerRe: How to generate GUID. Pin
Michael Dunn23-Aug-07 10:43
sitebuilderMichael Dunn23-Aug-07 10:43 

General General    News News    Suggestion Suggestion    Question Question    Bug Bug    Answer Answer    Joke Joke    Praise Praise    Rant Rant    Admin Admin   

Use Ctrl+Left/Right to switch messages, Ctrl+Up/Down to switch threads, Ctrl+Shift+Left/Right to switch pages.