Example #1
0
 /// <summary>
 /// Deallocate a Tango configuration object.
 /// </summary>
 public static void Free()
 {
     if (m_tangoConfig != IntPtr.Zero)
     {
         TangoConfigAPI.TangoConfig_free(m_tangoConfig);
     }
     else
     {
         Debug.Log(CLASS_NAME + ".Free() No allocated Tango Config found!");
     }
 }
Example #2
0
 /// <summary>
 /// Deallocate a Tango configuration object.
 /// </summary>
 public static void Free()
 {
     if (m_tangoConfig != IntPtr.Zero)
     {
         TangoConfigAPI.TangoConfig_free(m_tangoConfig);
     }
     else
     {
         DebugLogger.GetInstance.WriteToLog(DebugLogger.EDebugLevel.DEBUG_CRITICAL,
                                            CLASS_NAME + ".Free() No allocated Tango Config found!");
     }
 }
Example #3
0
        /// <summary>
        /// Releases all resource used by the <see cref="Tango.TangoConfig"/> object.
        /// </summary>
        /// <remarks>Call <see cref="Dispose"/> when you are finished using the <see cref="Tango.TangoConfig"/>. The
        /// <see cref="Dispose"/> method leaves the <see cref="Tango.TangoConfig"/> in an unusable state. After calling
        /// <see cref="Dispose"/>, you must release all references to the <see cref="Tango.TangoConfig"/> so the garbage
        /// collector can reclaim the memory that the <see cref="Tango.TangoConfig"/> was occupying.</remarks>
        public void Dispose()
        {
            if (m_configHandle != IntPtr.Zero)
            {
                TangoConfigAPI.TangoConfig_free(m_configHandle);
                m_configHandle = IntPtr.Zero;
            }
            else
            {
                Debug.Log(CLASS_NAME + ".Free() No allocated Tango Config found!");
            }

            GC.SuppressFinalize(this);
        }