>On Thu, Apr 06, 2006 at 10:18:16AM +0200, Stefan Dösinger wrote: >> Because windows' ddraw.dll restores everything when the app exists. I've >> added >> some code to do that do my ddraw lib. I restore the screen mode when the >> ddraw object is released, and on the last DllMain() unload call, I loop >> through all ddraw objects, print their refcount, destroy all the surfaces >> and >> the ddraw object. This restores the screen res successfully. > >Well it's the same for memory: who in his right mind in modern operating >system still 'free's at exit all 'malloc'ed memory :-) ?
Do you know the traveller's motto? "Leave only footprints" Meaning: don't destroy things that don't belong to you, don't pollute other stuff, don't leave garbage, don't rely on others to clean up after you :) So I'd say: Everyone who has a proud in his/her code as being a round, closed piece of work should also do the cleanup himself. I sure don't like if some tools report that my programs have leaks, no matter what modern, hi-tech, sophisticated OS they will run on. Call me old-fashioned :) Sorry for the rambling. bye Fabi