public override void Dispose() { _cachedFrame?.Dispose(); _cachedFrame = null; if (_IOleClientSite != null) { Marshal.ReleaseComObject(_IOleClientSite); _IOleClientSite = null; } if (_IOleInPlaceSite != null) { Marshal.ReleaseComObject(_IOleInPlaceSite); _IOleInPlaceSite = null; } base.Dispose(); }
protected override void Dispose(bool disposing) { if (disposing) { _cachedFrame?.Dispose(); _cachedFrame = null; if (_IOleClientSite != null) { Marshal.ReleaseComObject(_IOleClientSite); _IOleClientSite = null; } if (_IOleInPlaceSite != null) { Marshal.ReleaseComObject(_IOleInPlaceSite); _IOleInPlaceSite = null; } } base.Dispose(disposing); }