destroyInterface
Defined in carb/PluginCoreUtils.h
-
template<class T>
void destroyInterface(Version v, void *buf) An optional function that a plugin author can provide to destroy an interface.
Note
This function is only optionally required when using CARB_PLUGIN_IMPL_EX. When using CARB_PLUGIN_IMPL the destruction of interfaces is handled through calling the type destructor explicitly. A plugin author need not provide this function if
T
is a POD type.Warning
This function is called immediately before the plugin is unloaded, and after carbOnPluginShutdown. It must not use any Carbonite Framework functions. This function is not called in the event of shutdown via carb::quickReleaseFrameworkAndTerminate.
- Template Parameters
T – The interface type handled by this function. The generic class template for any type
T
is declared and implemented to do nothing by the CARB_PLUGIN_IMPL_EX macro, making this function optional. A plugin author may provide an explicit specialization in order to handle destruction of the interface type. Forcarb::IObject
for example, this would be:template <> void destroyInterface<carb::IObject>(carb::Version v, void* buf)
.- Parameters
v – The exact version that was ‘returned’ from fillInterface(carb::Version*, void*).
buf – The memory buffer that was passed to fillInterface(carb::Version*, void*).