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

◆ Clear() [2/3]

static unsafe void System.Array.Clear ( Array array)
inlinestatic

Definition at line 755 of file Array.cs.

756 {
757 if (array == null)
758 {
759 ThrowHelper.ThrowArgumentNullException(ExceptionArgument.array);
760 }
762 nuint num = methodTable->ComponentSize * array.NativeLength;
764 if (!methodTable->ContainsGCPointers)
765 {
766 SpanHelpers.ClearWithoutReferences(ref arrayDataReference, num);
767 }
768 else
769 {
770 SpanHelpers.ClearWithReferences(ref Unsafe.As<byte, IntPtr>(ref arrayDataReference), num / (nuint)sizeof(IntPtr));
771 }
772 }
static unsafe MethodTable * GetMethodTable(object obj)
static unsafe ref byte GetArrayDataReference(Array array)

References System.array, System.SpanHelpers.ClearWithoutReferences(), System.SpanHelpers.ClearWithReferences(), System.Runtime.InteropServices.MemoryMarshal.GetArrayDataReference(), System.Runtime.CompilerServices.RuntimeHelpers.GetMethodTable(), and System.ThrowHelper.ThrowArgumentNullException().

Referenced by Terraria.WorldGen.AddUpAlignmentCounts(), System.Numerics.BigIntegerCalculator.BitsBuffer.Apply(), System.Collections.Queue.Clear(), System.Collections.SortedList.Clear(), System.Collections.Stack.Clear(), System.Collections.Generic.PriorityQueue< TElement, TPriority >.Clear(), System.Collections.Generic.SortedList< TKey, TValue >.Clear(), System.Collections.Generic.Stack< T >.Clear(), System.Runtime.CompilerServices.ReadOnlyCollectionBuilder< T >.Clear(), System.Collections.Generic.Dictionary< TKey, TValue >.Clear(), System.Collections.Generic.HashSet< T >.Clear(), System.Collections.Generic.List< T >.Clear(), System.Collections.Generic.Queue< T >.Clear(), System.Collections.ArrayList.Clear(), System.Xml.XmlBinaryReaderSession.Clear(), System.Xml.XmlBinaryWriterSession.PriorityDictionary< K, V >.Clear(), Terraria.Utilities.Vertical64BitStrips.Clear(), Terraria.DataStructures.DoubleStack< T1 >.Clear(), Terraria.WorldGen.clearWorld(), Terraria.DataStructures.TileObjectPreviewData.CopyFrom(), Internal.Cryptography.PinAndClear.Dispose(), Internal.Cryptography.BasicSymmetricCipher.Dispose(), Internal.Cryptography.BasicSymmetricCipherBCrypt.Dispose(), Internal.Cryptography.HashProviderCng.Dispose(), Internal.Cryptography.UniversalCryptoDecryptor.Dispose(), System.Security.Cryptography.Rfc2898DeriveBytes.Dispose(), System.Security.Cryptography.PasswordDeriveBytes.Dispose(), System.Security.Cryptography.CryptoStream.Dispose(), System.Security.Cryptography.KeyedHashAlgorithm.Dispose(), System.Security.Cryptography.SymmetricAlgorithm.Dispose(), System.Security.Cryptography.CryptoStream.DisposeAsyncCore(), System.Numerics.BigIntegerCalculator.FastReducer.DivMul(), System.Net.Http.Headers.HeaderUtilities.Encode5987(), System.Formats.Asn1.AsnWriter.EnsureWriteCapacity(), System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ExportExplicitParameters(), System.Security.Cryptography.ECDiffieHellmanCng.ExportExplicitParameters(), System.Security.Cryptography.ECDiffieHellmanImplementation.ECDiffieHellmanCng.ExportParameters(), System.Security.Cryptography.ECDiffieHellmanCng.ExportParameters(), System.Security.Cryptography.CngKey.ExportPkcs8KeyBlob(), Microsoft.Xna.Framework.Graphics.SpriteBatch.Flush(), Terraria.Graphics.TileBatch.Flush(), System.Security.Cryptography.CryptoStream.FlushFinalBlockAsync(), System.Security.Cryptography.RandomNumberGenerator.GetBytes(), System.Security.Cryptography.RandomNumberGenerator.GetNonZeroBytes(), System.Xml.XmlSqlBinaryReader.HashCheckForDuplicateAttributes(), System.Security.Cryptography.HashAlgorithm.HashCore(), System.Security.Cryptography.DSA.HashSpanToArray(), System.Security.Cryptography.ECDsa.HashSpanToArray(), System.Security.Cryptography.Rfc2898DeriveBytes.Initialize(), System.Collections.Concurrent.ConcurrentBag< T >.WorkStealingQueue.LocalClear(), System.Xml.XmlSqlBinaryReader.NameFlush(), System.Numerics.BigIntegerCalculator.BitsBuffer.Overwrite(), System.Numerics.BigIntegerCalculator.BitsBuffer.Overwrite(), System.Formats.Asn1.AsnDecoder.ReadSubIdentifier(), System.Numerics.BigIntegerCalculator.BitsBuffer.Refresh(), System.Collections.Generic.List< T >.RemoveAll(), System.Collections.Generic.List< T >.RemoveRange(), System.Formats.Asn1.AsnWriter.Reset(), Internal.Cryptography.UniversalCryptoDecryptor.Reset(), Terraria.DataStructures.TileObjectPreviewData.Reset(), Terraria.MessageBuffer.Reset(), Terraria.SceneMetrics.Reset(), System.Threading.Tasks.Dataflow.BatchBlock< T >.BatchBlockTargetCore.RetrievePostponedItemsGreedyBounded(), System.Threading.Tasks.Dataflow.BatchBlock< T >.BatchBlockTargetCore.RetrievePostponedItemsNonGreedy(), System.Buffers.ConfigurableArrayPool< T >.Return(), System.Buffers.TlsOverPerCoreLockedStacksArrayPool< T >.Return(), System.Security.Cryptography.CngPkcs8.RewritePkcs8ECPrivateKeyWithZeroPublicKey(), System.IO.MemoryStream.SetLength(), System.Numerics.BigIntegerCalculator.FastReducer.SubMod(), System.Buffers.TlsOverPerCoreLockedStacksArrayPool< T >.Trim(), System.Security.Cryptography.ECDsa.TryHashData(), System.Security.Cryptography.RSA.TryHashData(), System.IO.MemoryStream.Write(), System.IO.MemoryStream.Write(), and System.IO.MemoryStream.WriteByte().