Fix crash during finalization when R.DLL cannot be found. If that happens,
REngine constructor throws an exception, but the finalizer still runs on the SafeHandle, which invokes Dispose(). This causes an exception when removing the non-existing ID from the instances dictionary. Also, the documentation says that you should not access managed resources during Finalize(), so I only do if called from Dispose().
Loading
Please sign in to comment