Ask a Question related to ASP.NET General, Design and Development.

  1. #1

    Default Destroy COM object

    Hi all,

    my ASP.NET page generates an COM object which is filled
    with a lot of data (approx. 30 MB).
    It is then stored in the Application-Collection to be
    accessible for all users of the page.

    Under some conditions I don't need this COM object anymore
    and like it to be destroyed.
    I'm using the following code to destroy this object:

    Application.Lock()
    Application.RemoveAll()
    Application.Clear()
    Application.UnLock()
    GC.Collect()
    GC.WaitForPendingFinalizers()

    But the Private Memory Size increases instead of descreasing!!
    Why???


    Thanks in advance for all help!

    Jenny
    Jenny Guest

  2. Similar Questions and Discussions

    1. #40511 [NEW]: __destruct() does not destroy vars $var
      From: afuzaylov at mlgpro dot com Operating system: linux PHP version: 5.2.1 PHP Bug Type: Class/Object related Bug...
    2. PAPACY IS THE ANTICHRIST THAT IS TRYING TO DESTROY THE LAW OF GOD. DANIEL 7.25
      PAPACY IS THE ANTICHRIST THAT IS TRYING TO DESTROY THE LAW OF GOD. DANIEL 7.25 SUNDAY IS THE DAY OF THE ROMAN BEAST, SABATH 7TH IS GODīS TRUE DAY....
    3. destroy an Object?
      is there a way to destroy and object? like ... thisObject = new Object(); can i destroy this? i have tried thisObject = null and unload()...
    4. IPC : destroy IPC::ShareLite-segments
      I use IPC::ShareLite-segments but havnt figured out an elegant way to destroy the created segments. The recommended way (manpage) always fails with...
    5. references => how not to destroy my data ?
      Hi, I'm struggling with references again. Underneath you will find a code snippet with some comments interleaved to tell what's going on. #...
  3. #2

    Default Re: Destroy COM object

    Try setting the COM object to tell after all this. If this com object is
    wrapped in some class you will need to call/implement dispose on it.


    "Jenny" <j.malloyNO@SPAMx-mail.net> wrote in message
    news:04ee01c34f66$462cde70$a501280a@phx.gbl...
    > Hi all,
    >
    > my ASP.NET page generates an COM object which is filled
    > with a lot of data (approx. 30 MB).
    > It is then stored in the Application-Collection to be
    > accessible for all users of the page.
    >
    > Under some conditions I don't need this COM object anymore
    > and like it to be destroyed.
    > I'm using the following code to destroy this object:
    >
    > Application.Lock()
    > Application.RemoveAll()
    > Application.Clear()
    > Application.UnLock()
    > GC.Collect()
    > GC.WaitForPendingFinalizers()
    >
    > But the Private Memory Size increases instead of descreasing!!
    > Why???
    >
    >
    > Thanks in advance for all help!
    >
    > Jenny

    Alvin Bruney Guest

  4. #3

    Default Destroy COM object

    Hi all,

    I'm using a COM DLL in order to generate an object. This
    object is then stored in the application state. But after
    setting it to nothing and doing a garbage collection it's
    still there. Is there another way to remove such an object
    completly?

    Regards
    Jenny
    Jenny Guest

  5. #4

    Default Destroy COM object

    use the below statement to clear the com dll.

    Marshal.ReleaseComObject(objcomDll)

    Note: objcomDll is the com dll name

    -Rob
    >-----Original Message-----
    >Hi all,
    >
    >I'm using a COM DLL in order to generate an object. This
    >object is then stored in the application state. But after
    >setting it to nothing and doing a garbage collection it's
    >still there. Is there another way to remove such an object
    >completly?
    >
    >Regards
    >Jenny
    >.
    >
    Rob Guest

Posting Permissions

  • You may not post new threads
  • You may post replies
  • You may not post attachments
  • You may not edit your posts

1 2 3 4 5 6 7 8 9 10 11 12 13 14 15 16 17 18 19 20 21 22 23 24 25 26 27 28 29 30 31 32 33 34 35 36 37 38 39 40 41 42 43 44 45 46 47 48 49 50 51 52 53 54 55 56 57 58 59 60 61 62 63 64 65 66 67 68 69 70 71 72 73 74 75 76 77 78 79 80 81 82 83 84 85 86 87 88 89 90 91 92 93 94 95 96 97 98 99 100 101 102 103 104 105 106 107 108 109 110 111 112 113 114 115 116 117 118 119 120 121 122 123 124 125 126 127 128 129 130 131 132 133 134 135 136 137 138 139