> Hello all, I am coding an animation package and can't find much
> information regarding just how long a Memory DC and its bitmap
> object can be kept. My question simplified is this: must a memory
> DC and its bitmap be released immediately after each use?
I believe that a DC can be held as long as a program wishes to hold it. If
the programmer forgets to release it before program termination, then
windows will automatically release it for them (but I still try to release
it myself). I've also noticed that several bitmap examples set up, use, and
release DC's repeatedly.
Currently that is how my sprite class works, but not to such a drastic
extent. I tend to handle my sprites such that while a current tile set "Has
Focus" (it's DC exists) my screen drawing loop occurs uninterrupted. I have
plans of redoing the class to eliminate the DC creation/deletion, but
haven't done it yet. I have done it that way in the past (with Win32Forth)
and never had any ill-effects from it. I have done some frame rate tests in
the past with a full screen of tiles at 60 frames/second with no dropout.
-Mike
.
Received on Fri May 12 2000 - 09:00:16 PDT
Subscribe to our e-mail list service. It's free for all SwiftForth and SwiftX users!
This archive was generated 08-Feb-2012. Archive updated nightly.