2 instantiations of WeakGCHandle
System.Private.CoreLib (2)
src\libraries\System.Private.CoreLib\src\System\Gen2GcCallback.cs (1)
28
_weakTargetObj = new
WeakGCHandle
<object>(targetObj);
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\WeakGCHandle.T.cs (1)
83
public static WeakGCHandle<T> FromIntPtr(IntPtr value) => new
WeakGCHandle
<T>(value);
20 references to WeakGCHandle
System.Private.CoreLib (19)
src\libraries\System.Private.CoreLib\src\System\Gen2GcCallback.cs (1)
18
private
WeakGCHandle
<object> _weakTargetObj;
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\GCHandle.cs (1)
26
/// <seealso cref="
WeakGCHandle
{T}"/>
src\libraries\System.Private.CoreLib\src\System\Runtime\InteropServices\WeakGCHandle.T.cs (17)
22
/// <typeparam name="T">The type of the object this <see cref="
WeakGCHandle
{T}"/> tracks to.</typeparam>
23
public struct WeakGCHandle<T> : IEquatable<
WeakGCHandle
<T>>, IDisposable
32
/// <param name="target">The object that uses the <see cref="
WeakGCHandle
{T}"/>.</param>
45
/// Tries to retrieve the target object that is referenced by the current <see cref="
WeakGCHandle
{T}"/> object.
72
/// Returns a new <see cref="
WeakGCHandle
{T}"/> object created from a handle to a managed object.
74
/// <param name="value">An <see cref="IntPtr"/> handle to a managed object to create a <see cref="
WeakGCHandle
{T}"/> object from.</param>
75
/// <returns>A new <see cref="
WeakGCHandle
{T}"/> object that corresponds to the value parameter.</returns>
79
/// The <see cref="IntPtr"/> representation of <see cref="
WeakGCHandle
{T}"/> is not
83
public static
WeakGCHandle
<T> FromIntPtr(IntPtr value) => new WeakGCHandle<T>(value);
86
/// Returns the internal integer representation of a <see cref="
WeakGCHandle
{T}"/> object.
88
/// <param name="value">A <see cref="
WeakGCHandle
{T}"/> object to retrieve an internal integer representation from.</param>
89
/// <returns>An <see cref="IntPtr"/> object that represents a <see cref="
WeakGCHandle
{T}"/> object.</returns>
91
/// The <see cref="IntPtr"/> representation of <see cref="
WeakGCHandle
{T}"/> is not
94
public static IntPtr ToIntPtr(
WeakGCHandle
<T> value) => value._handle;
96
/// <summary>Releases this <see cref="
WeakGCHandle
{T}"/>.</summary>
111
public override readonly bool Equals([NotNullWhen(true)] object? obj) => obj is
WeakGCHandle
<T> handle && Equals(handle);
114
public readonly bool Equals(
WeakGCHandle
<T> other) => _handle == other._handle;
System.Runtime (1)
artifacts\obj\System.Runtime\Debug\net10.0\System.Runtime.Forwards.cs (1)
700
[assembly: System.Runtime.CompilerServices.TypeForwardedTo(typeof(System.Runtime.InteropServices.
WeakGCHandle
<>))]