Hi, i have a strange problem visual studio 2008 , doesn't detect memory leaks, even if i cause them on purpouse, am i missing something ?
I am not using managed extensions.
Thanks
visual studio 2008 debugger problem
Started by v71, Oct 29 2008 12:13 AM
6 replies to this topic
#1
Posted 29 October 2008 - 12:13 AM
#2
Posted 29 October 2008 - 03:10 PM
You need to enable it using _CrtSetDbgFlag and _CRTDBG_LEAK_CHECK_DF.
"Stupid bug! You go squish now!!" - Homer Simpson
#3
Posted 29 October 2008 - 09:52 PM
Done, but still no report, the DEBUG option is set .
tried also to do write instructions into the program to set it manually
but still no report
i don't know if my ( big ) app is leaking or not
why Ms messes things up every time ?
tried also to do write instructions into the program to set it manually
but still no report
i don't know if my ( big ) app is leaking or not
why Ms messes things up every time ?
#4
Posted 30 October 2008 - 02:47 PM
v71 said:
Done, but still no report, the DEBUG option is set .
tried also to do write instructions into the program to set it manually
but still no report
i don't know if my ( big ) app is leaking or not
tried also to do write instructions into the program to set it manually
but still no report
i don't know if my ( big ) app is leaking or not
v71 said:
why Ms messes things up every time ?
"Stupid bug! You go squish now!!" - Homer Simpson
#5
Posted 30 October 2008 - 05:13 PM
Kenneth Gorking said:
It only works with the _DEBUG macro, but that might be what you meant. If nothing is dumped to the Debug Output Window, then there are either no memory leaks, or something else is wrong.
The thousands upon thoundsands of other people using msvc are not having any problems, just you :)
The thousands upon thoundsands of other people using msvc are not having any problems, just you :)
I have created a situation where a memory leak should be reported, and visual studio didn't , obviously there is something wrong, and i would like to have an advice from more of this billions of people , not just 2 , even msdn forumers are avoid the questions
#6
Posted 30 October 2008 - 08:13 PM
I just tried a small example, and it seems that you also need the _CRTDBG_ALLOC_MEM_DF flag. The following code:
int main(int argc, char* argv[])
{
_CrtSetDbgFlag(_CRTDBG_ALLOC_MEM_DF | _CRTDBG_LEAK_CHECK_DF);
int *i = (int*)malloc(128);
return 0;
}
dumps the following:Quote
Detected memory leaks!
Dumping objects ->
{102} normal block at 0x00857220, 128 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
Dumping objects ->
{102} normal block at 0x00857220, 128 bytes long.
Data: < > CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD CD
Object dump complete.
"Stupid bug! You go squish now!!" - Homer Simpson
#7
Posted 31 October 2008 - 11:51 AM
Tried that too, visual studio is not reporting memory leaks
1 user(s) are reading this topic
0 members, 1 guests, 0 anonymous users












