Beispiel #1
0
        /// <summary>
        /// Release the IDiposable resources
        /// </summary>
        /// <param name="disposing">True if called from Dispose()</param>
        protected virtual void Dispose(bool disposing)
        {
            if (null == interpreter)
            {
                return;
            }

            // Dispose of the unmanaged resouces
            if (disposing)
            {
                InputTensor.Dispose();
                OutputTensor.Dispose();
                interpreter.Dispose();
                flatBufferModel.Dispose();
            }

            InputTensor     = null;
            OutputTensor    = null;
            interpreter     = null;
            flatBufferModel = null;
        }