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

◆ CleanupSavedData()

unsafe void Microsoft.Xna.Framework.Graphics.Texture2D.CleanupSavedData ( )
inlinepackage

Definition at line 871 of file Texture2D.cs.

872 {
874 if (array == null)
875 {
876 return;
877 }
878 int num = 0;
879 if (0 < (nint)array.LongLength)
880 {
881 do
882 {
883 void* ptr = pFaceData[num].ToPointer();
884 if (ptr != null)
885 {
886 _003CModule_003E.delete_005B_005D(ptr);
887 }
888 ref IntPtr reference = ref pFaceData[num];
889 reference = IntPtr.Zero;
890 num++;
891 }
892 while (num < (nint)pFaceData.LongLength);
893 }
894 pFaceData = null;
895 }
static readonly IntPtr Zero
Definition IntPtr.cs:18
unsafe void * ToPointer()
Definition IntPtr.cs:210

References System.array, Microsoft.Xna.Framework.Graphics.Texture2D.pFaceData, System.IntPtr.ToPointer(), and System.IntPtr.Zero.

Referenced by Microsoft.Xna.Framework.Graphics.Texture2D._0021Texture2D(), Microsoft.Xna.Framework.Graphics.Texture2D.RecreateAndPopulateObject(), and Microsoft.Xna.Framework.Graphics.Texture2D.SaveDataForRecreation().