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#
  4. Badly behaving COM object.

Badly behaving COM object.

Scheduled Pinned Locked Moved C#
helpcomperformancetutorialquestion
5 Posts 5 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.
  • J Offline
    J Offline
    jbradshaw
    wrote on last edited by
    #1

    I've got a COM object that has a memory leak. This normally wouldn't be an issue except that my program is a kiosk app so it's running continuously. Using a different COM object is not an option. This is a standard visual COM object from a very large company. Rumor has it that the next version will fix the memory leak but the memory leak has been there for a long time so I'm not hopeful. So my thought is to destroy the object after a certain amount of time so that the memory will be released and to recreate it. But I can't figure out how to destroy the object other than to close the window and reopen it. Can anybody help? Thanks. Jeff.

    OriginalGriffO A _ P 4 Replies Last reply
    0
    • J jbradshaw

      I've got a COM object that has a memory leak. This normally wouldn't be an issue except that my program is a kiosk app so it's running continuously. Using a different COM object is not an option. This is a standard visual COM object from a very large company. Rumor has it that the next version will fix the memory leak but the memory leak has been there for a long time so I'm not hopeful. So my thought is to destroy the object after a certain amount of time so that the memory will be released and to recreate it. But I can't figure out how to destroy the object other than to close the window and reopen it. Can anybody help? Thanks. Jeff.

      OriginalGriffO Offline
      OriginalGriffO Offline
      OriginalGriff
      wrote on last edited by
      #2

      Have a second, identical window behind it and then destroy it? It's a brute-force-and-ignorance approach, but it may work if you time it right.

      Real men don't use instructions. They are only the manufacturers opinion on how to put the thing together.

      "I have no idea what I did, but I'm taking full credit for it." - ThisOldTony
      "Common sense is so rare these days, it should be classified as a super power" - Random T-shirt

      1 Reply Last reply
      0
      • J jbradshaw

        I've got a COM object that has a memory leak. This normally wouldn't be an issue except that my program is a kiosk app so it's running continuously. Using a different COM object is not an option. This is a standard visual COM object from a very large company. Rumor has it that the next version will fix the memory leak but the memory leak has been there for a long time so I'm not hopeful. So my thought is to destroy the object after a certain amount of time so that the memory will be released and to recreate it. But I can't figure out how to destroy the object other than to close the window and reopen it. Can anybody help? Thanks. Jeff.

        A Offline
        A Offline
        Abhinav S
        wrote on last edited by
        #3

        Wrong forum, mate.

        The funniest thing about this particular signature is that by the time you realise it doesn't say anything it's too late to stop reading it. My latest tip/trick Visit the Hindi forum here.

        1 Reply Last reply
        0
        • J jbradshaw

          I've got a COM object that has a memory leak. This normally wouldn't be an issue except that my program is a kiosk app so it's running continuously. Using a different COM object is not an option. This is a standard visual COM object from a very large company. Rumor has it that the next version will fix the memory leak but the memory leak has been there for a long time so I'm not hopeful. So my thought is to destroy the object after a certain amount of time so that the memory will be released and to recreate it. But I can't figure out how to destroy the object other than to close the window and reopen it. Can anybody help? Thanks. Jeff.

          _ Offline
          _ Offline
          _Erik_
          wrote on last edited by
          #4

          See Marshal.ReleaseComObject[^] method, but if the memory leak is consequence of a defective programming of the COM object, maybe this will not solve the problem and, maybe, nobody will be able to solve it except for the company which developed it.

          1 Reply Last reply
          0
          • J jbradshaw

            I've got a COM object that has a memory leak. This normally wouldn't be an issue except that my program is a kiosk app so it's running continuously. Using a different COM object is not an option. This is a standard visual COM object from a very large company. Rumor has it that the next version will fix the memory leak but the memory leak has been there for a long time so I'm not hopeful. So my thought is to destroy the object after a certain amount of time so that the memory will be released and to recreate it. But I can't figure out how to destroy the object other than to close the window and reopen it. Can anybody help? Thanks. Jeff.

            P Offline
            P Offline
            Pete OHanlon
            wrote on last edited by
            #5

            I told you what to do the last time[^] you asked this. For the benefit of others, the component you're talking about is Flash, and I suggested that you need to use AppDomains to cope with this.

            I have CDO, it's OCD with the letters in the right order; just as they ruddy well should be

            Forgive your enemies - it messes with their heads

            My blog | My articles | MoXAML PowerToys | Onyx

            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