ThreadLocal.Remove Method

Definition

Removes the current thread's value for this thread-local variable.

[Android.Runtime.Register("remove", "()V", "GetRemoveHandler")]
public virtual void Remove ();
[<Android.Runtime.Register("remove", "()V", "GetRemoveHandler")>]
abstract member Remove : unit -> unit
override this.Remove : unit -> unit
Attributes

Remarks

Removes the current thread's value for this thread-local variable. If this thread-local variable is subsequently #get read by the current thread, its value will be reinitialized by invoking its #initialValue method, unless its value is #set set by the current thread in the interim. This may result in multiple invocations of the initialValue method in the current thread.

Added in 1.5.

Java documentation for java.lang.ThreadLocal.remove().

Portions of this page are modifications based on work created and shared by the Android Open Source Project and used according to terms described in the Creative Commons 2.5 Attribution License.

Applies to