chleun-moon
chleun-moon
@davidfowl > No, ReleaseHandle happens when the safe handle is disposed explicitly or finalized. More details here If we cannot dispose the safe handle explicitly, only finalizer can release it....
If so, it's the best solution that thread local unmanaged memory should be released by explictly calling Dispose(). right?
Let me summarize our module. class Net provides all methods as static and internally keeps only single instance of NetImpl class. NetImpl class should have a handle (it's a SafeHandle)...
Thanks for your reply. I modified it as the above link and tested it. I got some warnings and made some further modification as follows. ``` @@ -2152,10 +2154,16 @@...
OK. I'll remove the `local_bh_disable()` and test again as you said. However, the exception occurs randomly and I'm not sure if it will be reproduced again. Thanks.