Ejemplo n.º 1
0
        /// <summary> Specialised default constructor for use only by derived class. </summary>
        protected unsafe QApp(IReadOnlyCollection<string> opts) {
            argc = opts.Count;
            char** argv = null;

            if (opts.Count > 0) {
                // Convert the string list to a C String Array
                COpts = new CStringArray(opts);
                COpts.Alloc();
                argv = (char**) COpts.Address();
            }
            _QApplication = new QApplication(ref argc, argv);
        }
Ejemplo n.º 2
0
        protected virtual void Dispose(bool disposing) {
            if (disposed) return;
            if (disposing)
                // Free other state (managed objects).
                _QApplication.Dispose();

            // Free your own state (unmanaged objects).
            // Set large fields to null.
            //COpts.DeAlloc();
            COpts = null;
            _QApplication = null;
            disposed = true;
        }