FOSVRInputDevice::~FOSVRInputDevice() { FScopeLock lock(contextMutex); IModularFeatures::Get().UnregisterModularFeature(GetModularFeatureName(), this); if (context) { if (leftHand) { osvrClientFreeInterface(context, leftHand); } if (rightHand) { osvrClientFreeInterface(context, rightHand); } for (auto iface : interfaces) { if (iface.Value) { osvrClientFreeInterface(context, iface.Value); } } } }
/** * Destructor. ***/ OSVR_Tracker::~OSVR_Tracker() { if (m_psOSVR_ClientInterface) osvrClientFreeInterface(m_psOSVR_ClientContext, m_psOSVR_ClientInterface); if (m_psOSVR_ClientContext) osvrClientShutdown(m_psOSVR_ClientContext); }
void OSVRInterface::Shutdown() { #if OSVR_ENABLED DeregisterCallbacks(); if (OSVRClientInterface != nullptr) { OSVR_ReturnCode ReturnCode = osvrClientFreeInterface(OSVRClientContext, OSVRClientInterface); check(ReturnCode == OSVR_RETURN_SUCCESS); OSVRClientInterface = nullptr; } #endif // OSVR_ENABLED }