Esempio n. 1
0
 public override void Dispose()
 {
     if (mTexture.IsDisposed == false)
     {
         mTexture.Dispose();
     }
 }
Esempio n. 2
0
 protected override void Dispose(bool disposing)
 {
     if (disposing)
     {
         if (mTexture.IsDisposed == false)
         {
             mTexture.Dispose();
         }
     }
 }
Esempio n. 3
0
    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;
 }
Esempio n. 5
0
 public virtual void Dispose()
 {
     if (Ref != null)
     {
         Ref.Dispose();
         Ref = null;
     }
 }
Esempio n. 6
0
 public void Dispose()
 {
     if (m_DataExportService != null)
     {
         m_DataExportService.Call("finish");
     }
     Ref.Dispose(ref m_DataExportService);
 }
Esempio n. 7
0
 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;
 }
Esempio n. 9
0
        public static void CacheInvokeAction(string Script, params ScriptArg[] Args)
        {
            object Result = CacheInvokeFunc <object>(Script, Args);

            if (Result is LuaReference Ref)
            {
                Ref.Dispose();
            }
        }
Esempio n. 10
0
        private void ShutdownTelemetry()
        {
#if UNITY_ANDROID
            Ref.Dispose(ref m_TelemetryProxy);
            Ref.Dispose(ref m_ExportProxy);

            m_SendResponseHandler = null;
            m_SyncResponseHandler = null;
#endif
        }
Esempio n. 11
0
        private void ShutdownUserProfile()
        {
#if UNITY_ANDROID
            Ref.Dispose(ref m_UserProfileProxy);

            m_GetUserHandler          = null;
            m_SetAnonUserHandler      = null;
            m_CheckUserChangedHandler = null;
#endif
        }
Esempio n. 12
0
        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);
        }
Esempio n. 13
0
 public void Dispose()
 {
     if (Action != null)
     {
         if (DisposeResponse)
         {
             Ref.Dispose(ref Response);
             DisposeResponse = false;
         }
         else
         {
             Response = null;
         }
         Action = null;
         s_Pool.Push(this);
     }
 }