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

C / C++ / MFC

 
Questiondebugging app to find out which code module doesn't decrease a count Pin
abiemann19-May-10 10:43
abiemann19-May-10 10:43 
AnswerRe: debugging app to find out which code module doesn't decrease a count Pin
«_Superman_»19-May-10 10:53
professional«_Superman_»19-May-10 10:53 
AnswerRe: debugging app to find out which code module doesn't decrease a count Pin
abiemann19-May-10 11:06
abiemann19-May-10 11:06 
AnswerRe: debugging app to find out which code module doesn't decrease a count Pin
Luc Pattyn19-May-10 11:11
sitebuilderLuc Pattyn19-May-10 11:11 
GeneralRe: debugging app to find out which code module doesn't decrease a count [modified] Pin
abiemann19-May-10 11:23
abiemann19-May-10 11:23 
GeneralRe: debugging app to find out which code module doesn't decrease a count Pin
Luc Pattyn19-May-10 11:31
sitebuilderLuc Pattyn19-May-10 11:31 
GeneralRe: debugging app to find out which code module doesn't decrease a count Pin
abiemann19-May-10 13:33
abiemann19-May-10 13:33 
AnswerRe: debugging app to find out which code module doesn't decrease a count Pin
Aescleal19-May-10 12:31
Aescleal19-May-10 12:31 
Hi,

If you're using static functions then the functions can only be called from one translation unit - the one that they're defined in. Funnily enough that's the one the balancing won't be happening in. From what you've said there's something a bit more going on - perhaps if you described what you were trying to count someone could give you a suggestion as to how to count it more accurately?

Cheers,

Ash

PS: For example if you're counting objects of a particular class you can use RAII to keep track of your count. If the count's unbalanced because you're not clearing up objects properly then a decent debug heap might be able to give you clue as to what sort of object is still alive when the program terminates. You might have to do something a bit gauche like look at the still allocated block and compare vtable pointers but it's possible.
AnswerRe: debugging app to find out which code module doesn't decrease a count Pin
Roger Allen21-May-10 6:30
Roger Allen21-May-10 6:30 
GeneralRe: debugging app to find out which code module doesn't decrease a count Pin
abiemann21-May-10 8:52
abiemann21-May-10 8:52 
Questionhow to stop run of a program after a message display [modified] Pin
mrby12319-May-10 7:10
mrby12319-May-10 7:10 
QuestionRe: how to stop run of a program after a message display Pin
David Crow19-May-10 7:32
David Crow19-May-10 7:32 
AnswerRe: how to stop run of a program after a message display Pin
mrby12319-May-10 8:23
mrby12319-May-10 8:23 
QuestionRe: how to stop run of a program after a message display Pin
David Crow19-May-10 8:44
David Crow19-May-10 8:44 
AnswerRe: how to stop run of a program after a message display Pin
Luc Pattyn19-May-10 7:39
sitebuilderLuc Pattyn19-May-10 7:39 
GeneralRe: how to stop run of a program after a message display Pin
mrby12319-May-10 9:13
mrby12319-May-10 9:13 
GeneralRe: how to stop run of a program after a message display Pin
Luc Pattyn19-May-10 9:39
sitebuilderLuc Pattyn19-May-10 9:39 
GeneralRe: how to stop run of a program after a message display Pin
mrby12319-May-10 10:40
mrby12319-May-10 10:40 
GeneralRe: how to stop run of a program after a message display Pin
«_Superman_»19-May-10 10:46
professional«_Superman_»19-May-10 10:46 
GeneralRe: how to stop run of a program after a message display Pin
Luc Pattyn19-May-10 11:19
sitebuilderLuc Pattyn19-May-10 11:19 
GeneralRe: how to stop run of a program after a message display Pin
mrby12319-May-10 12:12
mrby12319-May-10 12:12 
AnswerRe: how to stop run of a program after a message display Pin
Maximilien19-May-10 8:43
Maximilien19-May-10 8:43 
GeneralRe: how to stop run of a program after a message display Pin
mrby12319-May-10 9:15
mrby12319-May-10 9:15 
AnswerRe: how to stop run of a program after a message display Pin
Aescleal19-May-10 12:53
Aescleal19-May-10 12:53 
AnswerRe: how to stop run of a program after a message display Pin
KarstenK19-May-10 21:10
mveKarstenK19-May-10 21:10 

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.