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. GDI Objects

GDI Objects

Scheduled Pinned Locked Moved C / C++ / MFC
c++graphicsperformancehelpquestion
4 Posts 2 Posters 0 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.
  • S Offline
    S Offline
    sailu78
    wrote on last edited by
    #1

    Hi, I am using a frame, which is an inherited class from CFrameWnd, in an MFC application. When I open & close the frame, there are few extra GDI objects & User objects that gets created. That is, when a close is performed, all those user objects & GDI objects created do not get lost. I am monitoring this using the Windows Task Manager itself. Presuming a memory leak, I tried stepping thru the code to notice any memory leak but that is not reported either... Can somebody please help me with some pointers regarding this...? Sailu

    M 1 Reply Last reply
    0
    • S sailu78

      Hi, I am using a frame, which is an inherited class from CFrameWnd, in an MFC application. When I open & close the frame, there are few extra GDI objects & User objects that gets created. That is, when a close is performed, all those user objects & GDI objects created do not get lost. I am monitoring this using the Windows Task Manager itself. Presuming a memory leak, I tried stepping thru the code to notice any memory leak but that is not reported either... Can somebody please help me with some pointers regarding this...? Sailu

      M Offline
      M Offline
      Mike Beckerleg
      wrote on last edited by
      #2

      Does it leak the GDI objects everytime you open and close the frame or just the first time. If it is just the first time then it is nothing to worry about and is just MFC keeping handle to things that it will reuse. If the GDI count keeps going up with repeated open/closes then you do have a probelm. Mike

      S 1 Reply Last reply
      0
      • M Mike Beckerleg

        Does it leak the GDI objects everytime you open and close the frame or just the first time. If it is just the first time then it is nothing to worry about and is just MFC keeping handle to things that it will reuse. If the GDI count keeps going up with repeated open/closes then you do have a probelm. Mike

        S Offline
        S Offline
        sailu78
        wrote on last edited by
        #3

        Yes. It indeed keeps going up with repeated open/closes. Any ideas as to how do I exactly zero-in to the cause...??? -Sailu Mike Beckerleg wrote: Does it leak the GDI objects everytime you open and close the frame or just the first time. If it is just the first time then it is nothing to worry about and is just MFC keeping handle to things that it will reuse. If the GDI count keeps going up with repeated open/closes then you do have a probelm. Mike

        M 1 Reply Last reply
        0
        • S sailu78

          Yes. It indeed keeps going up with repeated open/closes. Any ideas as to how do I exactly zero-in to the cause...??? -Sailu Mike Beckerleg wrote: Does it leak the GDI objects everytime you open and close the frame or just the first time. If it is just the first time then it is nothing to worry about and is just MFC keeping handle to things that it will reuse. If the GDI count keeps going up with repeated open/closes then you do have a probelm. Mike

          M Offline
          M Offline
          Mike Beckerleg
          wrote on last edited by
          #4

          Try posting some code for us to have a look at.

          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