public override void Dispose() { if (mTexture.IsDisposed == false) { mTexture.Dispose(); } }
protected override void Dispose(bool disposing) { if (disposing) { if (mTexture.IsDisposed == false) { mTexture.Dispose(); } } }
static public bool IsInstalled(string inPackageName) { #if UNITY_ANDROID && !UNITY_EDITOR AndroidJavaObject activity = GetCurrentActivity(); using (AndroidJavaObject packageMgr = activity.Call <AndroidJavaObject>("getPackageManager")) { try { AndroidJavaObject packageInfo = packageMgr.Call <AndroidJavaObject>("getPackageInfo", inPackageName, packageMgr.GetStatic <int>("GET_SERVICES") | packageMgr.GetStatic <int>("GET_ACTIVITIES")); if (packageInfo == null) { return(false); } Ref.Dispose(ref packageInfo); return(true); } catch (Exception e) { Logger.Log("Unable to get package: {0}", e.Message); return(false); } } #else return(false); #endif }
protected virtual void SaveLayout() { Ref.Dispose(ref memoryStream); memoryStream = new MemoryStream(); dockManager.SaveLayoutToStream(memoryStream); deserializeButton.IsEnabled = true; }
public virtual void Dispose() { if (Ref != null) { Ref.Dispose(); Ref = null; } }
public void Dispose() { if (m_DataExportService != null) { m_DataExportService.Call("finish"); } Ref.Dispose(ref m_DataExportService); }
public override void Dispose() { if (Ref != null) { Ref.Dispose(); Ref = null; } }
protected virtual void SaveLayout() { Ref.Dispose(ref dockManagerStream); dockManagerStream = new MemoryStream(); viewsStream = new MemoryStream(); serializationViewModel.Store(viewsStream); dockManager.SaveLayoutToStream(dockManagerStream); deserializeButton.IsEnabled = true; }
public static void CacheInvokeAction(string Script, params ScriptArg[] Args) { object Result = CacheInvokeFunc <object>(Script, Args); if (Result is LuaReference Ref) { Ref.Dispose(); } }
private void ShutdownTelemetry() { #if UNITY_ANDROID Ref.Dispose(ref m_TelemetryProxy); Ref.Dispose(ref m_ExportProxy); m_SendResponseHandler = null; m_SyncResponseHandler = null; #endif }
private void ShutdownUserProfile() { #if UNITY_ANDROID Ref.Dispose(ref m_UserProfileProxy); m_GetUserHandler = null; m_SetAnonUserHandler = null; m_CheckUserChangedHandler = null; #endif }
public void Main(string[] args) { Ref <TestClass> myref = new Ref <TestClass>(new TestClass()); Ref <TestClass> newref = new Ref <TestClass>(myref); newref.Dispose(); myref.Dispose(); Console.WriteLine("Press a key to finish."); Console.ReadKey(false); }
public void Dispose() { if (Action != null) { if (DisposeResponse) { Ref.Dispose(ref Response); DisposeResponse = false; } else { Response = null; } Action = null; s_Pool.Push(this); } }