SoftReference Constructors
Definition
Important
Some information relates to prerelease product that may be substantially modified before it’s released. Microsoft makes no warranties, express or implied, with respect to the information provided here.
Overloads
SoftReference(Object) |
Creates a new soft reference that refers to the given object. |
SoftReference(Object, ReferenceQueue) |
Creates a new soft reference that refers to the given object and is registered with the given queue. |
SoftReference(IntPtr, JniHandleOwnership) |
A constructor used when creating managed representations of JNI objects; called by the runtime. |
SoftReference(Object)
Creates a new soft reference that refers to the given object.
[Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")]
public SoftReference (Java.Lang.Object? referent);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Object;)V", "")>]
new Java.Lang.Ref.SoftReference : Java.Lang.Object -> Java.Lang.Ref.SoftReference
Parameters
- referent
- Object
object the new soft reference will refer to
- Attributes
Remarks
Creates a new soft reference that refers to the given object. The new reference is not registered with any queue.
Java documentation for java.lang.ref.SoftReference.SoftReference(T)
.
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
SoftReference(Object, ReferenceQueue)
Creates a new soft reference that refers to the given object and is registered with the given queue.
[Android.Runtime.Register(".ctor", "(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V", "")]
public SoftReference (Java.Lang.Object? referent, Java.Lang.Ref.ReferenceQueue? q);
[<Android.Runtime.Register(".ctor", "(Ljava/lang/Object;Ljava/lang/ref/ReferenceQueue;)V", "")>]
new Java.Lang.Ref.SoftReference : Java.Lang.Object * Java.Lang.Ref.ReferenceQueue -> Java.Lang.Ref.SoftReference
Parameters
- referent
- Object
object the new soft reference will refer to
the queue with which the reference is to be registered,
or null
if registration is not required
- Attributes
Remarks
Creates a new soft reference that refers to the given object and is registered with the given queue.
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
SoftReference(IntPtr, JniHandleOwnership)
A constructor used when creating managed representations of JNI objects; called by the runtime.
protected SoftReference (IntPtr javaReference, Android.Runtime.JniHandleOwnership transfer);
new Java.Lang.Ref.SoftReference : nativeint * Android.Runtime.JniHandleOwnership -> Java.Lang.Ref.SoftReference
Parameters
- transfer
- JniHandleOwnership
A JniHandleOwnershipindicating how to handle javaReference
Remarks
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.