Dispose
Unloads the ONLYOFFICE Document Builder from the application memory when it is no longer needed. Generally, there is no need to dispose JS before exiting the process, it should happen automatically. It should only be used if the process needs the resources taken up by JS.
note
For JS, this method is not used. For .Net, use Destroy instead.
Syntax
- Python
- C++
- COM
- Java
@classmethod
def Dispose(cls)
static void Dispose();
HRESULT Dispose();
static void dispose();
Example
- Python
- C++
- COM
- Java
import docbuilder
docbuilder.CDocBuilder.Initialize("../documentBuilder")
builder = docbuilder.CDocBuilder()
docbuilder.CDocBuilder.Dispose()
std::wstring sWorkDirectory = NSUtils::GetBuilderDirectory();
CDocBuilder::Initialize(sWorkDirectory.c_str());
CDocBuilder oBuilder;
CDocBuilder::Dispose();
CoInitialize(NULL);
IONLYOFFICEDocBuilder* oBuilder = NULL;
oBuilder->Initialize();
oBuilder->Dispose();
CDocBuilder.initialize("");
CDocBuilder builder = new CDocBuilder();
CDocBuilder.dispose();