Terraria v1.4.4.9
Terraria source code documentation
Loading...
Searching...
No Matches

◆ ReleaseAllDeviceResources()

void Microsoft.Xna.Framework.Graphics.DeviceResourceManager.ReleaseAllDeviceResources ( )
inline

Definition at line 353 of file DeviceResourceManager.cs.

354 {
355 if (pSyncObject == null)
356 {
357 return;
358 }
359 bool lockTaken = false;
360 try
361 {
363 ulong[] array = new ulong[pResourceData.Keys.Count];
365 ulong[] array2 = array;
366 for (int i = 0; i < (nint)array2.LongLength; i++)
367 {
368 ulong key = array2[i];
369 if (pResourceData[key].CurrentRefCount > 0 && pResourceData[key].ManagedObject.Target is IGraphicsResource graphicsResource && !pResourceData[key].isDisposed)
370 {
371 graphicsResource.ReleaseNativeObject(disposeManagedResource: false);
372 }
373 }
374 }
375 finally
376 {
377 if (lockTaken)
378 {
380 }
381 }
382 }
static void Exit(object obj)
static void Enter(object obj)

References System.array, System.Collections.Generic.Dictionary< TKey, TValue >.KeyCollection.CopyTo(), System.Collections.Generic.Dictionary< TKey, TValue >.KeyCollection.Count, System.Threading.Monitor.Enter(), System.Threading.Monitor.Exit(), System.key, System.Collections.Generic.Dictionary< TKey, TValue >.Keys, Microsoft.Xna.Framework.Graphics.DeviceResourceManager.pResourceData, and Microsoft.Xna.Framework.Graphics.DeviceResourceManager.pSyncObject.

Referenced by Microsoft.Xna.Framework.Graphics.GraphicsDevice._0021GraphicsDevice().