Click here to Skip to main content
15,916,432 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: why i print out nothing? Pin
Chris Losinger30-Sep-02 16:27
professionalChris Losinger30-Sep-02 16:27 
GeneralPointer Elements & STL Containers :: STL Pin
valikac30-Sep-02 15:53
valikac30-Sep-02 15:53 
GeneralRe: Pointer Elements & STL Containers :: STL Pin
Chris Losinger30-Sep-02 16:24
professionalChris Losinger30-Sep-02 16:24 
kuphryn wrote:
Do functions such as remove() and erase() call ClassX
destructor, or do you have to delete them explicitly?


the container calls the destructor of the contained type. in your case, the contained type is a pointer, so it has no destructor (it's just a number). even more importantly, the destructor for a pointer does not delete the pointed-to object. this is nice, because you can use pointers as container elements and you don't have to worry that the objects that they point to will be deleted.

so, to really answer your question: yes, you have to manually delete the objects when you're done with them.

-c


All you have to do is tell the people they are being attacked, and denounce the opposition for lack of patriotism and exposing the country to danger.
-- Herman Goering, on how to control the public

GeneralRe: Pointer Elements & STL Containers :: STL Pin
RedZenBird30-Sep-02 17:46
RedZenBird30-Sep-02 17:46 
GeneralRe: Pointer Elements & STL Containers :: STL Pin
valikac30-Sep-02 18:00
valikac30-Sep-02 18:00 
GeneralString String! Pin
sherry_ca30-Sep-02 15:39
sherry_ca30-Sep-02 15:39 
GeneralRe: String String! Pin
Chris Losinger30-Sep-02 16:26
professionalChris Losinger30-Sep-02 16:26 
GeneralRe: String String! Pin
sherry_ca30-Sep-02 16:58
sherry_ca30-Sep-02 16:58 
GeneralRe: String String! Pin
Chris Losinger30-Sep-02 17:25
professionalChris Losinger30-Sep-02 17:25 
GeneralCList and flat DB Pin
G. White30-Sep-02 14:23
G. White30-Sep-02 14:23 
GeneralRe: CList and flat DB Pin
RedZenBird30-Sep-02 17:53
RedZenBird30-Sep-02 17:53 
GeneralRe: CList and flat DB Pin
G. White1-Oct-02 5:16
G. White1-Oct-02 5:16 
GeneralListview header column question Pin
alex.barylski30-Sep-02 13:45
alex.barylski30-Sep-02 13:45 
GeneralRe: Listview header column question Pin
Shog930-Sep-02 14:31
sitebuilderShog930-Sep-02 14:31 
GeneralRe: Listview header column question Pin
alex.barylski30-Sep-02 15:58
alex.barylski30-Sep-02 15:58 
Generalsaving data Pin
xai30-Sep-02 13:44
xai30-Sep-02 13:44 
GeneralRe: saving data Pin
valikac30-Sep-02 15:26
valikac30-Sep-02 15:26 
GeneralRe: saving data Pin
jhwurmbach30-Sep-02 21:36
jhwurmbach30-Sep-02 21:36 
QuestionCharacter position of caret (CEdit)? Pin
Anonymous30-Sep-02 12:09
Anonymous30-Sep-02 12:09 
AnswerRe: Character position of caret (CEdit)? Pin
RedZenBird30-Sep-02 12:26
RedZenBird30-Sep-02 12:26 
GeneralNew dialogs Pin
Brakanjan30-Sep-02 11:44
Brakanjan30-Sep-02 11:44 
GeneralRe: New dialogs Pin
Joaquín M López Muñoz30-Sep-02 11:42
Joaquín M López Muñoz30-Sep-02 11:42 
GeneralRe: New dialogs Pin
Brakanjan30-Sep-02 11:58
Brakanjan30-Sep-02 11:58 
GeneralWebBrowser Control & Getting the HTML Source Pin
carrie30-Sep-02 10:47
carrie30-Sep-02 10:47 

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.