Esempio n. 1
0
        /// <summary>
        /// Releases the unmanaged resources used by an instance of the
        /// <see cref="BillboardBatchReach"/> class and optionally releases the managed resources.
        /// </summary>
        /// <param name="disposing">
        /// <see langword="true"/> to release both managed and unmanaged resources;
        /// <see langword="false"/> to release only unmanaged resources.
        /// </param>
        protected virtual void Dispose(bool disposing)
        {
            if (!IsDisposed)
            {
                if (disposing)
                {
                    // Dispose managed resources.
                    _renderBatch.Dispose();
                }

                IsDisposed = true;
            }
        }
Esempio n. 2
0
    /// <inheritdoc/>
    protected override void Dispose(bool disposing)
    {
      if (!IsDisposed)
      {
        if (disposing)
        {
          // Dispose managed resources.
          _strokeBatch.Dispose();
          _fillBatch.Dispose();
          _fillEffect.Dispose();

          // Note: Do not dispose _strokeEffect. The effect is managed by the 
          // ContentManager and may be shared.
        }
      }

      base.Dispose(disposing);
    }