JniObjectReference Struct
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.
Stores a JNI object handle and reference type without creating a new JNI reference.
public struct JniObjectReference : IEquatable<Java.Interop.JniObjectReference>
type JniObjectReference = struct
- Inheritance
-
JniObjectReference
- Implements
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.
Constructors
| Name | Description |
|---|---|
| JniObjectReference(IntPtr, JniObjectReferenceType) |
Wraps an existing JNI reference handle with its reference type. |
Properties
| Name | Description |
|---|---|
| Handle |
Gets the stored JNI reference handle. |
| IsValid |
Gets whether the stored handle is nonzero. |
| Type |
Gets the stored JNI reference type. |
Methods
| Name | Description |
|---|---|
| Dispose(JniObjectReference, JniObjectReferenceOptions) |
Disposes the reference only when the options include source disposal. |
| Dispose(JniObjectReference) |
Releases a JNI reference according to its stored type and clears its handle. |
| Equals(JniObjectReference) |
Determines whether two reference values contain the same handle. |
| Equals(Object) |
Determines whether an object is a reference value with the same handle. |
| GetHashCode() |
Gets the hash code of the stored JNI handle. |
| NewGlobalRef() |
Creates a global reference through the runtime's object reference manager. |
| NewLocalRef() |
Creates a local reference through the runtime's object reference manager. |
| NewWeakGlobalRef() |
Creates a weak global reference through the runtime's object reference manager. |
| ToString() |
Returns a diagnostic description of the handle and reference type. |
Operators
| Name | Description |
|---|---|
| Equality(JniObjectReference, JniObjectReference) |
Determines whether two reference values have equal handles. |
| Inequality(JniObjectReference, JniObjectReference) |
Determines whether two reference values have different handles. |