Exemple #1
0
        private bool isDisposed = false;         // To detect redundant calls

        protected virtual void Dispose(bool disposing)
        {
            if (!isDisposed)
            {
                if (disposing)
                {
                    // TODO: delete managed state (managed objects).

                    if (assimpImporter != null)
                    {
                        assimpImporter.Dispose();
                    }

                    if (context != null)
                    {
                        context.threads.Dispose();
                    }

                    DefaultLogger.kill();
                }

                // TODO: free unmanaged resources (unmanaged objects) and replace finalizer below.
                // TODO: set fields of large size with null value.

                isDisposed = true;
            }
        }
Exemple #2
0
        /// <summary>
        /// Create a file where to output the  logs of assimp import process.
        /// </summary>
        /// <param name="filename">The name of the file wher to write the logs.</param>
        public void SetLogFile(string filename)
        {
            if (!DefaultLogger.isNullLogger())
            {
                DefaultLogger.kill();
            }

            DefaultLogger.create(filename, global::Assimp.Logger.LogSeverity.VERBOSE, aiDefaultLogStream.aiDefaultLogStream_FILE);
        }