Click here to Skip to main content
15,889,992 members
Home / Discussions / ATL / WTL / STL
   

ATL / WTL / STL

 
GeneralRe: How to Check the iterator is valid? Pin
jbiaojerry18-Sep-11 14:00
jbiaojerry18-Sep-11 14:00 
GeneralRe: How to Check the iterator is valid? Pin
darrendavis30-Sep-11 7:15
darrendavis30-Sep-11 7:15 
QuestionStreambuf problems Pin
Cold_Fearing_Bird6-Sep-11 20:33
Cold_Fearing_Bird6-Sep-11 20:33 
AnswerRe: Streambuf problems [modified] Pin
Orjan Westin6-Sep-11 23:24
professionalOrjan Westin6-Sep-11 23:24 
QuestionHow to use the hook function of Windows FileOpen dialog Pin
clever1015-Sep-11 21:13
clever1015-Sep-11 21:13 
AnswerRe: How to use the hook function of Windows FileOpen dialog Pin
MicroVirus6-Sep-11 1:35
MicroVirus6-Sep-11 1:35 
GeneralRe: How to use the hook function of Windows FileOpen dialog Pin
clever10110-Sep-11 1:07
clever10110-Sep-11 1:07 
QuestionMemory leak problem. Pin
sirtimid3-Sep-11 8:39
sirtimid3-Sep-11 8:39 
Hi all.

I have a memory leak on a C++ MFC app I'm trying to solve.
In the problematc part of code there are some function calls as follows:
void functionA()
{
functionX(new ClassConstructor());
}
Since this unmanaged code, is it safe to do that without freeing the memory allocated by the new operator, or it will be released after exiting the functionA scope?
Shouldn't be something like the following a good solution?
void functionA()
{
ClassConstructor *obj = new ClassContructor();
functionX(obj);
delete obj;
}

Thanks in advance Smile | :)
AnswerRe: Memory leak problem. Pin
Stephen Hewitt4-Sep-11 1:33
Stephen Hewitt4-Sep-11 1:33 
GeneralRe: Memory leak problem. Pin
sirtimid4-Sep-11 10:19
sirtimid4-Sep-11 10:19 
QuestionGetting AppData Directory Path Pin
jwalker3432-Sep-11 17:02
jwalker3432-Sep-11 17:02 
AnswerRe: Getting AppData Directory Path Pin
Richard Andrew x643-Sep-11 10:19
professionalRichard Andrew x643-Sep-11 10:19 
GeneralRe: Getting AppData Directory Path Pin
jwalker3435-Sep-11 9:52
jwalker3435-Sep-11 9:52 
GeneralRe: Getting AppData Directory Path Pin
Richard Andrew x645-Sep-11 10:13
professionalRichard Andrew x645-Sep-11 10:13 
AnswerRe: Getting AppData Directory Path Pin
MicroVirus6-Sep-11 1:28
MicroVirus6-Sep-11 1:28 
GeneralRe: Getting AppData Directory Path Pin
jwalker3436-Sep-11 5:44
jwalker3436-Sep-11 5:44 
GeneralRe: Getting AppData Directory Path Pin
MicroVirus6-Sep-11 15:31
MicroVirus6-Sep-11 15:31 
GeneralRe: Getting AppData Directory Path Pin
jwalker3437-Sep-11 16:03
jwalker3437-Sep-11 16:03 
Questionhelp me!!! Pin
zz526335731-Aug-11 5:30
zz526335731-Aug-11 5:30 
QuestionHow to use forms / dialog boxes with an ATL Project / BHO? Pin
abetterword23-Aug-11 4:22
abetterword23-Aug-11 4:22 
AnswerRe: How to use forms / dialog boxes with an ATL Project / BHO? Pin
MicroVirus6-Sep-11 2:06
MicroVirus6-Sep-11 2:06 
QuestionFailure to Recognise Base Class [modified] Pin
Bram van Kampen19-Aug-11 13:47
Bram van Kampen19-Aug-11 13:47 
AnswerRe: Failure to Recognise Base Class Pin
Richard MacCutchan20-Aug-11 0:23
mveRichard MacCutchan20-Aug-11 0:23 
GeneralRe: Failure to Recognise Base Class Pin
Bram van Kampen20-Aug-11 15:47
Bram van Kampen20-Aug-11 15:47 
GeneralRe: Failure to Recognise Base Class Pin
Richard MacCutchan20-Aug-11 23:32
mveRichard MacCutchan20-Aug-11 23:32 

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.