protected override void Dispose(bool disposing) { if (_disposed) { return; } if (disposing) { // 清理托管资源,调用自己管理的对象的Dispose方法 } // 清理非托管资源 Logger_CSharp.log_release(_ptr); SharpC.ReleaseCSObject(_log); _disposed = true; }
public Logger(SharpC sc) { _sharpc = sc; _log = SharpC.CacheFunc(Log); _ptr = Logger_CSharp.log_create(sc.CPtr, _log); }