{
public static void* ConvertToUnmanaged(T? managed) { throw null; }
public static T? ConvertToManaged(void* unmanaged) { throw null; }
+ public static void Free(void* unmanaged) { }
}
public sealed partial class ComObject : System.Runtime.InteropServices.IDynamicInterfaceCastable, System.Runtime.InteropServices.Marshalling.IUnmanagedVirtualMethodTableProvider
{
{
public static void* ConvertToUnmanaged(T? managed) { throw null; }
public static T? ConvertToManaged(void* unmanaged) { throw null; }
+ public static void Free(void* unmanaged) { }
}
[System.CLSCompliantAttribute(false)]
public readonly partial struct VirtualMethodTableInfo
return (T)StrategyBasedComWrappers.DefaultMarshallingInstance.GetOrCreateObjectForComInstance((nint)unmanaged, CreateObjectFlags.Unwrap);
}
+ public static void Free(void* unmanaged)
+ {
+ if (unmanaged != null)
+ {
+ Marshal.Release((nint)unmanaged);
+ }
+ }
+
internal static void* CastIUnknownToInterfaceType(nint unknown)
{
if (TargetInterfaceIID is null)