Click here to Skip to main content
15,888,521 members
Home / Discussions / C / C++ / MFC
   

C / C++ / MFC

 
QuestionXML Docs supported for C++ in 2003 or 2005? Pin
Todd Smith2-Nov-05 11:53
Todd Smith2-Nov-05 11:53 
QuestionLoad testing & performance monitoring Pin
Todd Smith2-Nov-05 11:33
Todd Smith2-Nov-05 11:33 
Questionthe memory leak Pin
valerie992-Nov-05 11:22
valerie992-Nov-05 11:22 
AnswerRe: the memory leak Pin
Christian Graus2-Nov-05 11:53
protectorChristian Graus2-Nov-05 11:53 
AnswerRe: the memory leak Pin
kakan2-Nov-05 18:44
professionalkakan2-Nov-05 18:44 
AnswerRe: the memory leak Pin
toxcct2-Nov-05 21:17
toxcct2-Nov-05 21:17 
AnswerRe: the memory leak Pin
krmed3-Nov-05 2:54
krmed3-Nov-05 2:54 
AnswerRe: the memory leak Pin
Tim Smith3-Nov-05 3:55
Tim Smith3-Nov-05 3:55 
As krmed already stated, make sure your allocation routine isn't being called multiple times. However, I wouldn't make krmed's change, since that might just be fixing the symptoms and not the real issue. It is the memory allocation version of the "off by one" error where someone fixes the problem by just adding one without tracking down the reason why the value is off by one.

Another problem might be that your closedown code isn't being invoked. I often see people spend endless amounts of time trying to figure out why are routine isn't working when in fact, the routine isn't even being invoked.

Both of those problems are the same class of problem, improper execution path.

Of course, this is all assuming that it is CallSumBin that is leaking. If you haven't verified that, then you might be looking at the wrong issue.

As to what Christian said, he is right. Constructing the filename like that is akin to running with scissors. As long as you are careful, things are "ok". But a slight mistake can cause memory corruption (which can manifest itself as a leak in some instances) and security issues. I won't go so far as saying C style is crap, mainly because I have seen far too many string processing systems created with managed strings that are just dogs. But you are playing with fire and really need to understand what you are doing when you do work with C strings.

Tim Smith

I'm going to patent thought. I have yet to see any prior art.

-- modified at 9:56 Thursday 3rd November, 2005
QuestionAscW Pin
samkook2-Nov-05 10:18
samkook2-Nov-05 10:18 
AnswerRe: AscW Pin
toxcct2-Nov-05 21:14
toxcct2-Nov-05 21:14 
GeneralRe: AscW Pin
samkook3-Nov-05 8:28
samkook3-Nov-05 8:28 
Questionxml in tree view control Pin
gr8coaster3292-Nov-05 10:05
gr8coaster3292-Nov-05 10:05 
AnswerRe: xml in tree view control Pin
AskQuestion2-Nov-05 10:28
AskQuestion2-Nov-05 10:28 
QuestionRe: xml in tree view control Pin
gr8coaster3292-Nov-05 12:41
gr8coaster3292-Nov-05 12:41 
AnswerRe: xml in tree view control Pin
AskQuestion3-Nov-05 0:20
AskQuestion3-Nov-05 0:20 
QuestionAnyone know a good tutorial on VC++ 6? Pin
Lord Kixdemp2-Nov-05 8:20
Lord Kixdemp2-Nov-05 8:20 
AnswerRe: Anyone know a good tutorial on VC++ 6? Pin
Ravi Bhavnani2-Nov-05 8:38
professionalRavi Bhavnani2-Nov-05 8:38 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Lord Kixdemp2-Nov-05 9:06
Lord Kixdemp2-Nov-05 9:06 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Kevin McFarlane2-Nov-05 9:24
Kevin McFarlane2-Nov-05 9:24 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Ravi Bhavnani2-Nov-05 9:46
professionalRavi Bhavnani2-Nov-05 9:46 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Steve Mayfield2-Nov-05 10:23
Steve Mayfield2-Nov-05 10:23 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Lord Kixdemp2-Nov-05 13:56
Lord Kixdemp2-Nov-05 13:56 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Ravi Bhavnani3-Nov-05 2:16
professionalRavi Bhavnani3-Nov-05 2:16 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
toxcct3-Nov-05 3:35
toxcct3-Nov-05 3:35 
GeneralRe: Anyone know a good tutorial on VC++ 6? Pin
Ravi Bhavnani3-Nov-05 4:32
professionalRavi Bhavnani3-Nov-05 4: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.