Skip to content
  • Categories
  • Recent
  • Tags
  • Popular
  • World
  • Users
  • Groups
Skins
  • Light
  • Cerulean
  • Cosmo
  • Flatly
  • Journal
  • Litera
  • Lumen
  • Lux
  • Materia
  • Minty
  • Morph
  • Pulse
  • Sandstone
  • Simplex
  • Sketchy
  • Spacelab
  • United
  • Yeti
  • Zephyr
  • Dark
  • Cyborg
  • Darkly
  • Quartz
  • Slate
  • Solar
  • Superhero
  • Vapor

  • Default (No Skin)
  • No Skin
Collapse
Code Project
  1. Home
  2. General Programming
  3. C / C++ / MFC
  4. leaked GDI objects!

leaked GDI objects!

Scheduled Pinned Locked Moved C / C++ / MFC
questiongraphics
3 Posts 3 Posters 1 Views 1 Watching
  • Oldest to Newest
  • Newest to Oldest
  • Most Votes
Reply
  • Reply as topic
Log in to reply
This topic has been deleted. Only users with topic management privileges can see it.
  • N Offline
    N Offline
    netx2003
    wrote on last edited by
    #1

    How do I check for leaked GDI objects?

    C M 2 Replies Last reply
    0
    • N netx2003

      How do I check for leaked GDI objects?

      C Offline
      C Offline
      Christian Graus
      wrote on last edited by
      #2

      They don't leak in W2000/XP. In W 95/98/ME, you'll find you suddenly can't draw any thing, nor can the system. MSDN mag ran a tool that showed the number of resources used and allowed you to browse them, a couple of years ago I think. Christian NO MATTER HOW MUCH BIG IS THE WORD SIZE ,THE DATA MUCT BE TRANSPORTED INTO THE CPU. - Vinod Sharma Anonymous wrote: OK. I read a c++ book. Or...a bit of it anyway. I'm sick of that evil looking console window. I think you are a good candidate for Visual Basic. - Nemanja Trifunovic

      1 Reply Last reply
      0
      • N netx2003

        How do I check for leaked GDI objects?

        M Offline
        M Offline
        MAAK
        wrote on last edited by
        #3

        They leak every where, but WinNT/Win2000,WinXP system are use 32bit vales for addressing up to 2^32 GDI objects while 9x system uses just 16bit values, thus can hold only 2^16, which is much fewer. However that does not mean you can use the whole 4 billion GDI objects in WinNT systems, still the system put an upper limit but I do not know it exaclty, but I did encounter resource leak in WinXP before. check this MSDN article http://msdn.microsoft.com/msdnmag/issues/01/03/leaks/default.aspx Anyway, to detect resource leaks in Win2000/WinXP just open the task manger and go to the processes tab, then from from the "View" menu choose "Select Columns..." the check "GDI Objects". After that look up your process from the system processes and monitor its GDI Object, if they constantly increase then you have a leak, if it increase then stop increasing then it could just be initial allocations.

        1 Reply Last reply
        0
        Reply
        • Reply as topic
        Log in to reply
        • Oldest to Newest
        • Newest to Oldest
        • Most Votes


        • Login

        • Don't have an account? Register

        • Login or register to search.
        • First post
          Last post
        0
        • Categories
        • Recent
        • Tags
        • Popular
        • World
        • Users
        • Groups