简体   繁体   中英

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, AxDYNAview).

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 .

The technical post webpages of this site follow the CC BY-SA 4.0 protocol. If you need to reprint, please indicate the site URL or the original address.Any question please contact:yoyou2525@163.com.

 
粤ICP备18138465号  © 2020-2024 STACKOOM.COM