Re: [GD-Windows] Terminating a program
Brought to you by:
vexxed72
From: Emmanuel A. <e_a...@ya...> - 2005-08-01 09:11:11
|
Is it that true ? We have an game demo here on a PC that uses large sound buffers. When we kill the app using the task manager, and launch once again the application, the framerate become really slow, and we can't get any good framerate but by booting the PC. Launching with no sound (or without those big buffers) behave correctly, so it seems related to sound. So I came to the conclusion that sound memory wasn't correctly released when killing the app. Is it a driver bug ? And I though I had some similar issues with graphics ( but, speaking of it, maybe it was on W98 ). Emmanuel Ps : And for the original question, I would also use a specific message in order to tell the application to shut down properly... --- Jon Watte <hp...@mi...> a écrit : > > If you're on NT-based Windows, just killing the > process will work. It's > a real OS with a real kernel, so all resources will > be magically > released (barring any driver bugs, of course).(*) > > If you want this on Win98 or WinME, you're screwed, > though. Similarly, > if there's any state you might want to re-use (such > as files being > written to at any point in your program), there's no > guarantee of their > consistency. > > Cheers, > > / h+ > > > (*) This is why I usually advocate implementing > "quit" as "exit(0)" > rather than fully releasing everything, because to > release everything, > you have to walk through it, probably paging in a > bunch of cruft just to > tell the runtime library you don't need it. I hate > applications that > take 20 seconds to quit. The kernel can do a much > better job of just > making it go away on quit than you can. > > > epa...@ko... wrote: > > I have divided my system to a launcher program and > the actual (full > > screen) graphics application. > > > > In some cases the laucher needs to terminate the > graphics application. > > > > I have been trying > > SendMessageTimeout(hwnd,WM_CLOSE,0,0, > > SMTO_NORMAL, > > 10000, > > &res); > > > > and > > > > PostMessage(hwnd, WM_CLOSE, 0, 0) ; > > > > > > but neither of these is fully reliable. In some > cases > > I get the Windows "End Program" dialogue on screen > asking > > the user if the program should really be > terminated. > > > > That is not ok for me. > > > > Actually I don't really care if the program gets > its chance of > > getting cleanly shut down, but it is very much > necessary that the > > OpenGL (Nvidia) and sound drivers (Creative) are > not left in a > > corrupt state. And Windows (XP) itself must be > able to get > > all resources back etc. > > > > Any ideas how to do this? > > > > Eero > > > > > > > > > > > ------------------------------------------------------- > > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > > from IBM. Find simple to follow Roadmaps, > straightforward articles, > > informative Webcasts and more! Get everything you > need to get up to > > speed, fast. > http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > > _______________________________________________ > > Gamedevlists-windows mailing list > > Gam...@li... > > > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > > Archives: > > > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > > > > > > -- > -- The early bird gets the worm, but the second > mouse gets the cheese. > > > ------------------------------------------------------- > SF.Net email is sponsored by: Discover Easy Linux > Migration Strategies > from IBM. Find simple to follow Roadmaps, > straightforward articles, > informative Webcasts and more! Get everything you > need to get up to > speed, fast. > http://ads.osdn.com/?ad_id=7477&alloc_id=16492&op=click > _______________________________________________ > Gamedevlists-windows mailing list > Gam...@li... > https://lists.sourceforge.net/lists/listinfo/gamedevlists-windows > Archives: > http://sourceforge.net/mailarchive/forum.php?forum_id=555 > ___________________________________________________________________________ Appel audio GRATUIT partout dans le monde avec le nouveau Yahoo! Messenger Téléchargez cette version sur http://fr.messenger.yahoo.com |