Click here to Skip to main content
15,887,596 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
AnswerRe: Lining up the Decimal Points Pin
BobInNJ5-Feb-14 11:10
BobInNJ5-Feb-14 11:10 
SuggestionRe: Lining up the Decimal Points Pin
David Crow5-Feb-14 16:07
David Crow5-Feb-14 16:07 
GeneralRe: Lining up the Decimal Points Pin
BobInNJ6-Feb-14 2:10
BobInNJ6-Feb-14 2:10 
QuestionProper array memory management in C++ Pin
Don Guy3-Feb-14 12:43
Don Guy3-Feb-14 12:43 
AnswerRe: Proper array memory management in C++ Pin
Richard MacCutchan3-Feb-14 21:42
mveRichard MacCutchan3-Feb-14 21:42 
AnswerRe: Proper array memory management in C++ Pin
Maximilien4-Feb-14 5:26
Maximilien4-Feb-14 5:26 
GeneralRe: Proper array memory management in C++ Pin
jschell6-Feb-14 8:34
jschell6-Feb-14 8:34 
AnswerRe: Proper array memory management in C++ Pin
Malli_S4-Feb-14 22:14
Malli_S4-Feb-14 22:14 
Apart from the solution that Richard has given, I'd like to suggest you to go through the code snippet from WHILE block and ensure that the array index variable 'counter' is increased properly whenever an image is selected. Because, looking at the code snippet you gave, the index variable 'counter' is not incremented immediately after allocation index element (or you didn't include that part while pasting the code).

Looking at the logic you explained, it seems that you may not be deleting the image data in the while loop. Or are you?
If the user has the choice of deselecting the image, you should be able to delete the respective indexed image item, and should maintain the empty slot index data. That involves extra bookkeeping.

I would suggest to give a try using STL container classes. For that, this[^][^] may help you.

If possible, provide the full WHILE loop code snippet. That will help to find out memory leak (as your app is ending up much memory).
[Delegates]      [Virtual Desktop]      [Tray Me !]

-Malli...! Rose | [Rose]

QuestionRelative path for #include directive - how to specify subdirectory on "down"level Pin
Vaclav_31-Jan-14 10:18
Vaclav_31-Jan-14 10:18 
AnswerRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Garth J Lancaster31-Jan-14 10:57
professionalGarth J Lancaster31-Jan-14 10:57 
AnswerRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
jeron131-Jan-14 11:00
jeron131-Jan-14 11:00 
GeneralRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Vaclav_31-Jan-14 11:09
Vaclav_31-Jan-14 11:09 
AnswerRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Richard Andrew x6431-Jan-14 11:25
professionalRichard Andrew x6431-Jan-14 11:25 
AnswerRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Richard MacCutchan31-Jan-14 22:13
mveRichard MacCutchan31-Jan-14 22:13 
GeneralRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Vaclav_1-Feb-14 16:14
Vaclav_1-Feb-14 16:14 
AnswerRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Randor 1-Feb-14 21:20
professional Randor 1-Feb-14 21:20 
GeneralRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Vaclav_2-Feb-14 3:50
Vaclav_2-Feb-14 3:50 
GeneralRe: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Richard MacCutchan1-Feb-14 21:24
mveRichard MacCutchan1-Feb-14 21:24 
GeneralSOLVED Re: Relative path for #include directive - how to specify subdirectory on "down"level Pin
Vaclav_3-Feb-14 4:14
Vaclav_3-Feb-14 4:14 
QuestionBuilding UI Automation in C++ for MFC applications?? Pin
Member 1031937631-Jan-14 2:24
Member 1031937631-Jan-14 2:24 
AnswerRe: Building UI Automation in C++ for MFC applications?? Pin
Richard MacCutchan31-Jan-14 2:51
mveRichard MacCutchan31-Jan-14 2:51 
AnswerRe: Building UI Automation in C++ for MFC applications?? Pin
Randor 1-Feb-14 21:28
professional Randor 1-Feb-14 21:28 
QuestionProblem to open ppt file using automation. Pin
Le@rner31-Jan-14 0:43
Le@rner31-Jan-14 0:43 
SuggestionRe: Problem to open ppt file using automation. Pin
Jochen Arndt31-Jan-14 1:34
professionalJochen Arndt31-Jan-14 1:34 
GeneralRe: Problem to open ppt file using automation. Pin
Le@rner31-Jan-14 1:42
Le@rner31-Jan-14 1:42 

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.