If this is your first visit, be sure to
check out the FAQ by clicking the
link above. You may have to register
before you can post: click the register link above to proceed. To start viewing messages,
select the forum that you want to visit from the selection below.

Windows GDI objects are a limited resource. If you don't free an
object with a call to DeleteObject everytime you create a new
object, then you will sometime run out of resources. This will
cause problems with programs other than your own.

Allocated GDI object are not freed when the program exits. These
remain allocated until a reboot.

Originally posted by Gyannea
That means it would be a very dumb thing to do as I have done above. There would be no way to delete the first pen.

Brian

yes it would be, there are some gdi tracking tools, don't have my favorite on this machine, but I can probably post it later if you'd like, or the link to it, to breakdown the gdi allocations for your process. One of the things you should keep track of when doing unit testing blada blada...because accidents/mistakes do happen.

* The Perfect Platform for Game Developers: Android
Developing rich, high performance Android games from the ground up is a daunting task. Intel has provided Android developers with a number of tools that can be leveraged by Android game developers.

* The Best Reasons to Target Windows 8
Learn some of the best reasons why you should seriously consider bringing your Android mobile development expertise to bear on the Windows 8 platform.