In an attempt to see if a garbage collection would invalidate a Function Pointer returned from a call to Marshal.GetFunctionPointerForDelegate<T>(), I call GC.Collect() directly after and it throws an ExecutionEngineException. Is this a bug with .NET Core or am I doing something wrong?
.NET Runtime version: .NET Core 2.1
In an attempt to see if a garbage collection would invalidate a Function Pointer returned from a call to
Marshal.GetFunctionPointerForDelegate<T>(), I callGC.Collect()directly after and it throws anExecutionEngineException. Is this a bug with .NET Core or am I doing something wrong?.NET Runtime version:
.NET Core 2.1