|
| [WD23] How can I unload a .NET object/assembly |
| Iniciado por guest, 17,ago. 2018 10:45 - 2 respuestas |
| |
| | | |
|
| |
| Publicado el 17,agosto 2018 - 10:45 |
Hi,
I need a little help with a .NET assembly.
The .NET assembly works well for the first time. On the second call, I cannot get a connection to the terminal. What do I wrong?
My code: (code very short, only to demostrate the problem) tim_terminal is SIX.TimApi.Terminal dynamic tim_terminal = new "SIX.TimApi.Terminal" tim_terminal.Connect()
On exit: tim_terminal.Disconnect() delete tim_terminal
With Sysinternals "ListDlls" the TimApi.dll shows in memory, even after I "delete" the instance?!
I tried:
nID=LoadDLL("TimApi.DLL") and on exit: FreeDLL(nID)
but without success, TimApi.dll is still in memory.
BTW: the complete code is in a window, so it "should" destroy after closing the window??
GetActiveObject does not work for .NET assemblys (LoadDll/FreeDll too I think?!)
How can I complete unload/delete the loaded .NET object??
(sorry for cross posting on Google+, but it's urgent) |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,agosto 2018 - 12:04 |
Alexander,
try putting yrou declaration global and not in the window tim_terminal is SIX.TimApi.Terminal dynamic tim_terminal = new "SIX.TimApi.Terminal"
And skip the 'delete'
Maybe not what we've learned in our OOP lessons but if it works, it works... |
| |
| |
| | | |
|
| | |
| |
| Publicado el 17,agosto 2018 - 12:50 |
| Hi Arie, thank you, exactly that worked! |
| |
| |
| | | |
|
| | | | |
| | |
|