Click here to Skip to main content
16,016,736 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
GeneralRe: keeping child dialog open Pin
PJ Arends3-Sep-04 7:06
professionalPJ Arends3-Sep-04 7:06 
GeneralRe: keeping child dialog open Pin
BlackDice3-Sep-04 7:10
BlackDice3-Sep-04 7:10 
GeneralRe: keeping child dialog open Pin
David Crow3-Sep-04 7:15
David Crow3-Sep-04 7:15 
GeneralRe: keeping child dialog open Pin
BlackDice3-Sep-04 7:20
BlackDice3-Sep-04 7:20 
GeneralRe: keeping child dialog open Pin
David Crow3-Sep-04 7:36
David Crow3-Sep-04 7:36 
GeneralRe: keeping child dialog open Pin
BlackDice3-Sep-04 7:47
BlackDice3-Sep-04 7:47 
QuestionAny one help Memory Leak ? Pin
Amarelia3-Sep-04 7:02
Amarelia3-Sep-04 7:02 
AnswerRe: Any one help Memory Leak ? Pin
David Crow3-Sep-04 7:10
David Crow3-Sep-04 7:10 
For every call to calloc(), regardless of the execution path, there needs to be a corresponding call to free(). You do not have that here. For example:

compr = (Byte*)calloc((uInt)comprLen, 1);
uncompr = (Byte*)calloc((uInt)uncomprLen, 1);
 
if (compr == Z_NULL || uncompr == Z_NULL)
    return -2;
 
// what if compr is NULL but uncompr is not?  you are returning without
// freeing uncomrp
 
uncomprLen = strlen (sIn);
int iResult = test_compress(compr, &comprLen, (Bytef*)sIn, uncomprLen);
if (iResult != 0)
    return -3;
 
// at this point, compr and uncompr are non-NULL but have been freed.
Until you can get these type of problems addressed, the symptoms you describe are not surprising.


"When I was born I was so surprised that I didn't talk for a year and a half." - Gracie Allen


AnswerRe: Any one help Memory Leak ? Pin
Rick York3-Sep-04 13:09
mveRick York3-Sep-04 13:09 
GeneralDatabase work in Visual C++ Pin
Iftikhar Baig3-Sep-04 6:36
sussIftikhar Baig3-Sep-04 6:36 
GeneralRe: Database work in Visual C++ Pin
David Crow3-Sep-04 7:01
David Crow3-Sep-04 7:01 
GeneralRe: Database work in Visual C++ Pin
Imtiaz Baig3-Sep-04 7:08
sussImtiaz Baig3-Sep-04 7:08 
GeneralRe: Database work in Visual C++ Pin
David Crow3-Sep-04 7:14
David Crow3-Sep-04 7:14 
QuestionActiveX TypeLib Practices: property or method? Pin
KFournier3-Sep-04 6:28
KFournier3-Sep-04 6:28 
GeneralHey i am looking for real MSGINA code Pin
ThatsAlok3-Sep-04 6:21
ThatsAlok3-Sep-04 6:21 
GeneralRe: Hey i am looking for real MSGINA code Pin
Michael Dunn3-Sep-04 7:18
sitebuilderMichael Dunn3-Sep-04 7:18 
GeneralRe: Hey i am looking for real MSGINA code Pin
ThatsAlok3-Sep-04 19:44
ThatsAlok3-Sep-04 19:44 
GeneralRe: Hey i am looking for real MSGINA code Pin
David Crow7-Sep-04 7:51
David Crow7-Sep-04 7:51 
GeneralRe: Hey i am looking for real MSGINA code Pin
ThatsAlok7-Sep-04 23:09
ThatsAlok7-Sep-04 23:09 
Generalexcel automation!! Pin
pnpfriend3-Sep-04 5:56
pnpfriend3-Sep-04 5:56 
GeneralRe: excel automation!! Pin
David Crow3-Sep-04 6:11
David Crow3-Sep-04 6:11 
GeneralRe: excel automation!! Pin
pnpfriend3-Sep-04 6:56
pnpfriend3-Sep-04 6:56 
GeneralRe: excel automation!! Pin
David Crow3-Sep-04 7:02
David Crow3-Sep-04 7:02 
GeneralRe: excel automation!! Pin
pnpfriend3-Sep-04 9:02
pnpfriend3-Sep-04 9:02 
GeneralRe: excel automation!! Pin
David Crow3-Sep-04 9:42
David Crow3-Sep-04 9: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.