unmanaged memory leak in .net through activex component dynavis
I'm using an ActiveX component originally written only for pre .Net days that causes a memory leak. All .Net related intances (AxHost, etc..) are properly released yet the unmanaged memory keeps growing. (according to .Net mem profiler)
Is there any way to force release unmanaged memory from within .Net? Maybe this can be solved with a way of handling unruly ActiveX components?
The components are Dynavix 2 (dyDisplay, PictureDocument, A开发者_JAVA百科xDYNAview).
Unfortunately no, the .Net runtime is not responsible for unmanaged memory.
What you could do is to create a program and use IPC Remoting to communicate between the two. When you no longer need the controls you can kill the second program (or kill it when its memory usage grows too much).
You can even host your secondary application's windows in your controls - using the same trick Windows Screensavers do in preview mode.
精彩评论