Click here to Skip to main content
15,909,518 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: Cannot get the correct cursor position in picture control Pin
Code-o-mat4-Feb-09 10:12
Code-o-mat4-Feb-09 10:12 
GeneralRe: Cannot get the correct cursor position in picture control Pin
z01e4-Feb-09 23:05
z01e4-Feb-09 23:05 
QuestionMemory Leak Pin
rr_ramesh714-Feb-09 1:37
rr_ramesh714-Feb-09 1:37 
QuestionRe: Memory Leak Pin
prasad_som4-Feb-09 1:42
prasad_som4-Feb-09 1:42 
AnswerRe: Memory Leak Pin
rr_ramesh714-Feb-09 2:18
rr_ramesh714-Feb-09 2:18 
GeneralRe: Memory Leak Pin
Cedric Moonen4-Feb-09 2:37
Cedric Moonen4-Feb-09 2:37 
AnswerRe: Memory Leak Pin
prasad_som4-Feb-09 3:32
prasad_som4-Feb-09 3:32 
AnswerRe: Memory Leak Pin
Stuart Dootson4-Feb-09 1:43
professionalStuart Dootson4-Feb-09 1:43 
How are the arrays declared?

If they're declared as local variables (as shown with localArray below), they will definitely be cleared up, as they're allocated space on the stack, which is tidied up when the function exits.

double SomeFunction(int x)
{
   double localArray[] = { 1.0, 2.0, 3.0, 4.0 };
   const size_t localArraySize = sizeof localArray / sizeof localArray[0];
   return x<localArraySize?localArray[x]:-1.0;
}

AnswerRe: Memory Leak Pin
Cedric Moonen4-Feb-09 1:46
Cedric Moonen4-Feb-09 1:46 
GeneralRe: Memory Leak Pin
Code-o-mat4-Feb-09 2:25
Code-o-mat4-Feb-09 2:25 
Questiontesting a ini file in vc++6 Pin
hrishiS4-Feb-09 1:26
hrishiS4-Feb-09 1:26 
AnswerRe: testing a ini file in vc++6 Pin
prasad_som4-Feb-09 1:39
prasad_som4-Feb-09 1:39 
GeneralRe: testing a ini file in vc++6 Pin
hrishiS4-Feb-09 2:47
hrishiS4-Feb-09 2:47 
GeneralRe: testing a ini file in vc++6 Pin
krmed4-Feb-09 2:54
krmed4-Feb-09 2:54 
GeneralRe: testing a ini file in vc++6 Pin
hrishiS4-Feb-09 3:01
hrishiS4-Feb-09 3:01 
QuestionRe: testing a ini file in vc++6 Pin
David Crow4-Feb-09 3:14
David Crow4-Feb-09 3:14 
AnswerRe: testing a ini file in vc++6 Pin
hrishiS4-Feb-09 3:58
hrishiS4-Feb-09 3:58 
QuestionDLL debugging problem. Pin
sam_psycho4-Feb-09 0:15
sam_psycho4-Feb-09 0:15 
AnswerRe: DLL debugging problem. Pin
Nishad S4-Feb-09 0:26
Nishad S4-Feb-09 0:26 
AnswerRe: DLL debugging problem. Pin
prasad_som4-Feb-09 0:50
prasad_som4-Feb-09 0:50 
GeneralRe: DLL debugging problem. Pin
sam_psycho4-Feb-09 0:58
sam_psycho4-Feb-09 0:58 
GeneralRe: DLL debugging problem. Pin
Naveen4-Feb-09 1:24
Naveen4-Feb-09 1:24 
AnswerRe: DLL debugging problem. Pin
Stuart Dootson4-Feb-09 1:39
professionalStuart Dootson4-Feb-09 1:39 
AnswerRe: DLL debugging problem. Pin
Cedric Moonen4-Feb-09 1:49
Cedric Moonen4-Feb-09 1:49 
Questionmove items in a CTreeCtrl using drag and drop Pin
William Engberts3-Feb-09 23:49
William Engberts3-Feb-09 23:49 

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.