Problem is that the destructor will only be called when I cause a shutdown of the program and before you would see anything on the screen the program would be shut down.Ah, thats right. I used this with allegro thats why it worked
Well, instead using cout you could print a text with directx or even a huge red square to tell you that the destructor was called, it should work at the same way I guess.
How to check if program has cleaned up properly?
Re: How to check if program has cleaned up properly?
Hi Muttley,
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
Re: How to check if program has cleaned up properly?
also ofcourse the debugger won't break in the destructor if you're running release tho lol
and you can do some kind of temp code test in which you do something like for ex: if using chili framework in Go()
and you can do some kind of temp code test in which you do something like for ex: if using chili framework in Go()
Code: Select all
if( keyb.IsKeyPressed( 'T' ) )
{
CObj test( params );
test.Print();
// once code reaches '}' the destructor would be called
}
always available, always on, about ~10 years c/c++, java[script], win32/directx api, [x]html/css/php/some asp/sql experience. (all self taught)
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Knows English, Spanish and Japanese.
[url=irc://irc.freenode.net/#pchili]irc://irc.freenode.net/#pchili[/url] [url=irc://luisr14.no-ip.org/#pchili]alt[/url] -- join up if ever want real-time help or to just chat --
Re: How to check if program has cleaned up properly?
i think if you put the winmain code inside a block {} might work. It will cause the code inside the block finish before winmain than you will be able to see it.Asimov wrote:Hi Muttley,Problem is that the destructor will only be called when I cause a shutdown of the program and before you would see anything on the screen the program would be shut down.Ah, thats right. I used this with allegro thats why it worked
Well, instead using cout you could print a text with directx or even a huge red square to tell you that the destructor was called, it should work at the same way I guess.
Re: How to check if program has cleaned up properly?
There are special programs call profilers that will attach to a running process and give you detailed information about it while running. You should look for a profiler for Win32 memory allocation / memory leaks.
Chili
Re: How to check if program has cleaned up properly?
Hi chill,
Thanks I will look into that when I finished modelling my robot. It is quite complex heh heh.
Thanks I will look into that when I finished modelling my robot. It is quite complex heh heh.
----> Asimov
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk
"You know no matter how much I think I have learnt. I always end up hitting brick walls"
http://www.asimoventerprises.co.uk