/// <summary> /// Destroy the image tracking subsystem. /// </summary> public override void Destroy() { if (s_NativeProviderPtr != IntPtr.Zero) { Native.Destroy(s_NativeProviderPtr); s_NativeProviderPtr = IntPtr.Zero; s_NativeTrackerCreationJobHandle = default(JobHandle); } m_PerceptionHandle.Dispose(); // Release retained privileges class MagicLeapPrivileges.Shutdown(); }
private void StopInternal() { if (IsStarted) { MLDevice.UnregisterUpdate(this.Update); MLDevice.UnregisterApplicationPause(this.OnApplicationPause); MLDevice.UnregisterDestroy(instance.StopInternal); MLResult.Code resultCode = instance.StopAPI(); if (DidNativeCallSucceed(resultCode, $"{typeof(T).Name} Stop")) { MLPluginLog.Debug($"{typeof(T).Name} API stopped successfully"); } if (perceptionHandle.active) { perceptionHandle.Dispose(); } IsStarted = false; } }
public override void Destroy() { m_PerceptionHandle.Dispose(); }