scripting:api:external-document-view:unload

Unload

Directs the view handler to release all resources that have been allocated based on the item passed in during the initialization.

ExternalDocumentView.Unload();
ExternalDocumentView.Unload
HRESULT hr = ExternalDocumentView.Unload();