Click here to Skip to main content
15,900,110 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
Questionpointers to class Pin
hrishiS9-Jul-09 1:02
hrishiS9-Jul-09 1:02 
QuestionRe: pointers to class Pin
Adam Roderick J9-Jul-09 1:14
Adam Roderick J9-Jul-09 1:14 
AnswerRe: pointers to class Pin
hrishiS9-Jul-09 1:26
hrishiS9-Jul-09 1:26 
GeneralRe: pointers to class Pin
Adam Roderick J9-Jul-09 1:37
Adam Roderick J9-Jul-09 1:37 
QuestionRe: pointers to class Pin
CPallini9-Jul-09 1:41
mveCPallini9-Jul-09 1:41 
AnswerRe: pointers to class Pin
«_Superman_»9-Jul-09 1:49
professional«_Superman_»9-Jul-09 1:49 
QuestionRAII / RIIA best-practices question about std::vector Pin
Mike the Red9-Jul-09 0:30
Mike the Red9-Jul-09 0:30 
AnswerRe: RAII / RIIA best-practices question about std::vector Pin
Stuart Dootson9-Jul-09 2:06
professionalStuart Dootson9-Jul-09 2:06 
Mike the Red wrote:
I recall that vector<> leaks unless I call vector<>.clear() when I'm done with the vector.


You recall incorrectly Smile | :) vector deallocates and calls the destructor of each contained object when it's destructed.

Mike the Red wrote:
Does that mean, considering RAII, that whenever I want to use std::vector the best-practice method would be to write a specialized container class that calls .clear() in the destructor and exposes all the std::vector methods?


No - just use vector.

All STL container classes are (minus trivial bugs) intended to have that behaviour, i.e. they destruct the contained elements and deallocate their storage when destructed.

Java, Basic, who cares - it's all a bunch of tree-hugging hippy cr*p

QuestionSo, that means.... Pin
Mike the Red9-Jul-09 2:23
Mike the Red9-Jul-09 2:23 
AnswerRe: Fair 'nuff, but, if vector deallocates, can you see why this leaks: Pin
Stuart Dootson9-Jul-09 2:25
professionalStuart Dootson9-Jul-09 2:25 
Jokeheh.. beat my edit by 2 minutes ; P &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -nt- Pin
Mike the Red9-Jul-09 2:33
Mike the Red9-Jul-09 2:33 
GeneralRe: heh.. beat my edit by 2 minutes ; P &nbsp;&nbsp;&nbsp;&nbsp;&nbsp; -nt- Pin
Stuart Dootson9-Jul-09 2:36
professionalStuart Dootson9-Jul-09 2:36 
Questioncolored tabcontrol for smartphone Pin
emre079-Jul-09 0:24
emre079-Jul-09 0:24 
QuestionHow to read 'MODIFY' File/Folder permission Pin
sumd9-Jul-09 0:06
sumd9-Jul-09 0:06 
AnswerRe: How to read 'MODIFY' File/Folder permission Pin
Adam Roderick J9-Jul-09 0:42
Adam Roderick J9-Jul-09 0:42 
GeneralRe: How to read 'MODIFY' File/Folder permission Pin
sumd9-Jul-09 2:12
sumd9-Jul-09 2:12 
GeneralRe: How to read 'MODIFY' File/Folder permission Pin
Adam Roderick J9-Jul-09 2:45
Adam Roderick J9-Jul-09 2:45 
GeneralRe: How to read 'MODIFY' File/Folder permission Pin
David Crow9-Jul-09 2:54
David Crow9-Jul-09 2:54 
AnswerRe: How to read 'MODIFY' File/Folder permission Pin
David Crow9-Jul-09 2:51
David Crow9-Jul-09 2:51 
Question[Message Deleted] Pin
alpha.gis20088-Jul-09 23:59
alpha.gis20088-Jul-09 23:59 
AnswerRe: looking for VC++ GPS application Pin
Chandrasekharan P9-Jul-09 0:06
Chandrasekharan P9-Jul-09 0:06 
Questionremoving menu in MFC document\view architecture Pin
AmitCohen2228-Jul-09 22:45
AmitCohen2228-Jul-09 22:45 
AnswerRe: removing menu in MFC document\view architecture Pin
Adam Roderick J8-Jul-09 22:55
Adam Roderick J8-Jul-09 22:55 
Questionunicode character problem Pin
Rakesh58-Jul-09 22:12
Rakesh58-Jul-09 22:12 
AnswerRe: unicode character problem Pin
chenjiajie20088-Jul-09 22:30
chenjiajie20088-Jul-09 22:30 

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.