Now pinning delegates in callbacks / callresults

This commit is contained in:
James King 2017-11-28 10:37:40 +00:00
parent 47f153ffa6
commit e2ef2b0bf7
2 changed files with 1269 additions and 1269 deletions

File diff suppressed because it is too large Load Diff

View File

@ -317,9 +317,9 @@ private void CallresultFunctions( SteamApiDefinition.StructDef c, bool Result, s
WriteLine( "//" ); WriteLine( "//" );
WriteLine( "// Allocate a handle to each function, so they don't get disposed" ); WriteLine( "// Allocate a handle to each function, so they don't get disposed" );
WriteLine( "//" ); WriteLine( "//" );
WriteLine( "handle.FuncA = GCHandle.Alloc( funcA );" ); WriteLine( "handle.FuncA = GCHandle.Alloc( funcA, GCHandleType.Pinned );" );
WriteLine( "handle.FuncB = GCHandle.Alloc( funcB );" ); WriteLine( "handle.FuncB = GCHandle.Alloc( funcB, GCHandleType.Pinned );" );
WriteLine( "handle.FuncC = GCHandle.Alloc( funcC );" ); WriteLine( "handle.FuncC = GCHandle.Alloc( funcC, GCHandleType.Pinned );" );
WriteLine(); WriteLine();
WriteLine( "//" ); WriteLine( "//" );