Skip to content

Commit

Permalink
Skip managed marshaller entirely in Make() methods
Browse files Browse the repository at this point in the history
  • Loading branch information
Sergio0694 committed Jan 8, 2024
1 parent f98b35f commit c1a80ce
Showing 1 changed file with 1 addition and 2 deletions.
3 changes: 1 addition & 2 deletions src/cswinrt/code_writers.h
Original file line number Diff line number Diff line change
Expand Up @@ -9415,8 +9415,7 @@ RuntimeHelpers.RunClassConstructor(typeof(%).TypeHandle);
public static IntPtr Make()
{
using var marshaler = MarshalInspectable<%>.CreateMarshaler(_factory).As<ABI.WinRT.Interop.IActivationFactory.Vftbl>(InterfaceIIDs.IActivationFactory_IID);
return marshaler.GetRef();
return MarshalInspectable<%>.CreateMarshaler2(_factory, InterfaceIIDs.IActivationFactory_IID).Detach();
}
static readonly % _factory = new %();
Expand Down

0 comments on commit c1a80ce

Please sign in to comment.