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

◆ Dispose() [2/2]

virtual void System.Threading.ThreadLocal< T >.Dispose ( bool disposing)
inlineprotectedvirtual

Definition at line 297 of file ThreadLocal.cs.

298 {
299 int num;
301 {
302 num = ~_idComplement;
303 _idComplement = 0;
304 if (num < 0 || !_initialized)
305 {
306 return;
307 }
308 _initialized = false;
309 for (LinkedSlot next = _linkedSlot._next; next != null; next = next._next)
310 {
311 LinkedSlotVolatile[] slotArray = next._slotArray;
312 if (slotArray != null)
313 {
314 next._slotArray = null;
315 slotArray[num].Value._value = default(T);
316 slotArray[num].Value = null;
317 }
318 }
319 }
320 _linkedSlot = null;
321 s_idManager.ReturnId(num, _trackAllValues);
322 }
static readonly IdManager s_idManager

References System.Threading.ThreadLocal< T >._idComplement, System.Threading.ThreadLocal< T >._initialized, System.Threading.ThreadLocal< T >._linkedSlot, System.Threading.ThreadLocal< T >.LinkedSlot._next, System.Threading.ThreadLocal< T >._trackAllValues, and System.Threading.ThreadLocal< T >.s_idManager.