Merge pull request #558 from bobbahbrown/we-hate-gc

Fix GC race condition in sending packets causing crash from steamworks
This commit is contained in:
Garry Newman 2021-09-24 13:50:24 +01:00 committed by GitHub
commit fa34bc76f9
No known key found for this signature in database
GPG Key ID: 4AEE18F83AFDEB23

View File

@ -60,7 +60,9 @@ namespace Steamworks
private static readonly Dictionary<IntPtr, ReferenceCounter> ReferenceCounters =
new Dictionary<IntPtr, ReferenceCounter>( 1024 );
public static readonly IntPtr FreeFunctionPointer = Marshal.GetFunctionPointerForDelegate<FreeFn>( Free );
private static readonly FreeFn FreeFunctionPin = new FreeFn( Free );
public static readonly IntPtr FreeFunctionPointer = Marshal.GetFunctionPointerForDelegate( FreeFunctionPin );
public static IntPtr Get( int size, int referenceCount )
{