int ReleaseExternalModule (int moduleID);
Decreases the reference count for a module loaded using LoadExternalModule or LoadExternalModuleEx.
When you call LoadExternalModule successfully on a module, the module reference count increments by one. When you call ReleaseExternalModule, the module reference count decrements by one.
If the reference count decrements to zero, the module ID is invalidated and you cannot access the module through GetExternalModuleAddr or RunExternalModule. If, in addition, the module file is not in the project and not loaded as an instrument, ReleaseExternalModule removes the external module from memory.
If you want to unload the module regardless of the reference count, call UnloadExternalModule rather than ReleaseExternalModule. Use ReleaseExternalModule when multiple calls might have been made to LoadExternalModule on the same module and you do not want to unload the module in case other parts of the application still use it.
Input | ||
Name | Type | Description |
moduleID | integer | Module ID you obtain from LoadExternalModule or LoadExternalModuleEx. |
Name | Type | Description | ||||||||||
status | integer | The result of the operation.
|