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. COM
  4. AccessibleObjectFromPoint memory leakage problem..

AccessibleObjectFromPoint memory leakage problem..

Scheduled Pinned Locked Moved COM
helpcomperformancetutorialannouncement
3 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.
  • O Offline
    O Offline
    onlyjaypatel
    wrote on last edited by
    #1

    Hi, We have used the same code as given in http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx to capture objects under mouse in timer.But we are facing memory leakage problem. While debuging this code we got the point of leakage is in function AccessibleObjectFromPoint. We already using IAccesible::Release function and VariantClear to release memory but still memory leakage is there. Any one know ,how to release memory used after AccessibleObjectFromPoint is called. Please help. Thanx in advance. -Jay

    _ 1 Reply Last reply
    0
    • O onlyjaypatel

      Hi, We have used the same code as given in http://blogs.msdn.com/oldnewthing/archive/2004/04/23/118893.aspx to capture objects under mouse in timer.But we are facing memory leakage problem. While debuging this code we got the point of leakage is in function AccessibleObjectFromPoint. We already using IAccesible::Release function and VariantClear to release memory but still memory leakage is there. Any one know ,how to release memory used after AccessibleObjectFromPoint is called. Please help. Thanx in advance. -Jay

      _ Offline
      _ Offline
      _Superman_
      wrote on last edited by
      #2

      The leak could be from accessing a member function of IAccesible and not freeing its output parameter like the SysFreeString in the link. You should consider using ATL classes like CComPtr[^] which is a smart pointer and do not need to be released. Some other useful ATL classes are - CComBSTR[^] CComVariant[^]

      «_Superman_» I love work. It gives me something to do between weekends.
      Microsoft MVP (Visual C++)

      O 1 Reply Last reply
      0
      • _ _Superman_

        The leak could be from accessing a member function of IAccesible and not freeing its output parameter like the SysFreeString in the link. You should consider using ATL classes like CComPtr[^] which is a smart pointer and do not need to be released. Some other useful ATL classes are - CComBSTR[^] CComVariant[^]

        «_Superman_» I love work. It gives me something to do between weekends.
        Microsoft MVP (Visual C++)

        O Offline
        O Offline
        onlyjaypatel
        wrote on last edited by
        #3

        Hi, Thanx for reply. Actualy we had removed all IAccessible function calls to clear that doubt,So now there is only one function call in timer that AccessibleObjectFromPoint() ,But still there is a memory leakage. If you have any knowledge regarding this please let us know. Thanx again, -Jay

        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