mirror of
https://github.com/Facepunch/Facepunch.Steamworks.git
synced 2025-01-27 14:08:06 +03:00
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:
commit
fa34bc76f9
@ -60,7 +60,9 @@ namespace Steamworks
|
|||||||
private static readonly Dictionary<IntPtr, ReferenceCounter> ReferenceCounters =
|
private static readonly Dictionary<IntPtr, ReferenceCounter> ReferenceCounters =
|
||||||
new Dictionary<IntPtr, ReferenceCounter>( 1024 );
|
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 )
|
public static IntPtr Get( int size, int referenceCount )
|
||||||
{
|
{
|
||||||
|
Loading…
x
Reference in New Issue
Block a user