Click here to Skip to main content
15,925,781 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Help with Documents and Views Pin
Mazdak20-Feb-02 19:08
Mazdak20-Feb-02 19:08 
GeneralRe: Help with Documents and Views Pin
Steen Krogsgaard20-Feb-02 21:48
Steen Krogsgaard20-Feb-02 21:48 
GeneralError with compiled app (localization) Pin
blink4me20-Feb-02 12:11
blink4me20-Feb-02 12:11 
GeneralMemory leak Pin
Stew20-Feb-02 11:20
Stew20-Feb-02 11:20 
GeneralRe: Memory leak Pin
Christian Graus20-Feb-02 11:31
protectorChristian Graus20-Feb-02 11:31 
GeneralRe: Memory leak Pin
CodeGuy20-Feb-02 11:41
CodeGuy20-Feb-02 11:41 
GeneralRe: Memory leak Pin
Stew20-Feb-02 14:04
Stew20-Feb-02 14:04 
GeneralRe: Memory leak Pin
CodeGuy21-Feb-02 1:56
CodeGuy21-Feb-02 1:56 
No new thoughts, just the same ones.

You have a pointer to a Text element in the struct. What it sounds like you're doing is calling 'new' to allocate memory for each Text element every time the file is selected from the combo box.

What you have to do is 'delete' the memory used by the Text elements each time you reselect a file. The vector only manages memory for the struct; it doesn't manage memory for elements inside the struct like the Text element.

The CString of course is not a problem because it manages its own memory.

CodeGuy

The WTL newsgroup: over 1200 members! Be a part of it. http://groups.yahoo.com/group/wtl
GeneralMember variables which are Pointers to User Defined Classes - Prob with CPropertySheet Pin
dazinith20-Feb-02 11:16
dazinith20-Feb-02 11:16 
GeneralRe: Member variables which are Pointers to User Defined Classes - Prob with CPropertySheet Pin
dazinith20-Feb-02 11:18
dazinith20-Feb-02 11:18 
GeneralSplitter Windows Pin
Anthony988720-Feb-02 8:59
Anthony988720-Feb-02 8:59 
GeneralRe: Splitter Windows Pin
Steen Krogsgaard20-Feb-02 21:53
Steen Krogsgaard20-Feb-02 21:53 
GeneralDialog from MFC Extension Dll Pin
NikoTanghe20-Feb-02 8:07
NikoTanghe20-Feb-02 8:07 
GeneralRe: Dialog from MFC Extension Dll Pin
Joaquín M López Muñoz20-Feb-02 9:50
Joaquín M López Muñoz20-Feb-02 9:50 
GeneralDialogProc Pin
Brian van der Beek20-Feb-02 8:00
Brian van der Beek20-Feb-02 8:00 
GeneralRe: DialogProc Pin
Nish Nishant20-Feb-02 8:13
sitebuilderNish Nishant20-Feb-02 8:13 
GeneralRe: DialogProc Pin
Brian van der Beek20-Feb-02 8:48
Brian van der Beek20-Feb-02 8:48 
GeneralRe: DialogProc Pin
Paul M Watt20-Feb-02 9:17
mentorPaul M Watt20-Feb-02 9:17 
GeneralButton Menu Pin
Anthony988720-Feb-02 7:12
Anthony988720-Feb-02 7:12 
GeneralRe: Button Menu Pin
Joaquín M López Muñoz20-Feb-02 7:19
Joaquín M López Muñoz20-Feb-02 7:19 
GeneralRe: Button Menu Pin
Ravi Bhavnani20-Feb-02 7:23
professionalRavi Bhavnani20-Feb-02 7:23 
QuestionHow to do a SetPixel with GDI+ Pin
20-Feb-02 7:04
suss20-Feb-02 7:04 
AnswerRe: How to do a SetPixel with GDI+ Pin
Mazdak20-Feb-02 7:30
Mazdak20-Feb-02 7:30 
AnswerRe: How to do a SetPixel with GDI+ Pin
Jon Gohr20-Feb-02 9:15
Jon Gohr20-Feb-02 9:15 
GeneralRe: How to do a SetPixel with GDI+ Pin
20-Feb-02 11:53
suss20-Feb-02 11:53 

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.