Src/MonoGame.Framework/Graphics/GraphicsDevice.cs
/// <summary>
/// Trigger the DeviceResetting event
/// Currently internal to allow the various platforms to send the event at the appropriate time.
/// </summary>
Trigger the DeviceResetting event
Currently internal to allow the various platforms to send the event at the appropriate time.
Trigger the DeviceResetting event Currently internal to allow the various platforms to send the event at the appropriate time .
internal void OnDeviceResetting()
        {
            if (DeviceResetting != null)
                DeviceResetting(this, EventArgs.Empty);
            lock (_resourcesLock)
            {
                foreach (var resource in _resources)
                {
                    var target = resource.Target as GraphicsResource;
                    if (target != null)
                        target.GraphicsDeviceResetting();
                }
                _resources.RemoveAll(wr => !wr.IsAlive);
            }
        }
internal void OnDeviceResetting ( ) { if ( DeviceResetting != null ) DeviceResetting ( this , EventArgs . Empty ) ; lock ( _resourcesLock ) { foreach ( var resource in _resources ) { var target = resource . Target as GraphicsResource ; if ( target != null ) target . GraphicsDeviceResetting ( ) ; } _resources . RemoveAll ( wr => ! wr . IsAlive ) ; } }
Trigger the DeviceResetting event
Currently internal to allow the various platforms to send the event at the appropriate time.
Trigger the DeviceResetting event Currently internal to allow the various platforms to send the event at the appropriate time .
// Remove references to resources that have been garbage collected.