when i want to clear a List ,it will fail ,after “wasHit.Clear();”,the wasHit element is still in ,not empty. when I want to change the element ,it run error :
public List wasHit = new List();
public override void clean()
{
wasHit.Clear();
wasHit[0] = Guid.Empty;
}
error:
[ 00:56:45.352 ]: [Error] Native interop exception!
[ 00:56:45.352 ]: [Warning] Exception has been thrown during Main thread action. Invalid ManagedHandle
Stack strace:
at FlaxEngine.Interop.ManagedHandle.ManagedHandlePool.GetObject(IntPtr handle) in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.Managed.cs:line 513
at FlaxEngine.Interop.ManagedHandle.get_Target() in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.Managed.cs:line 360
at FlaxEngine.Interop.NativeInterop.MarshalHelperReferenceType`1.ToManaged(T& managedValue, IntPtr nativePtr, Boolean byRef) in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.cs:line 782
at FlaxEngine.Interop.NativeInterop.MarshalHelper`1.ToManaged(T& managedValue, IntPtr nativePtr, Boolean byRef) in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.cs:line 472
at FlaxEngine.Interop.NativeInterop.Invoker.InvokerStaticNoRet1`1.MarshalAndInvoke(Object delegateContext, ManagedHandle instancePtr, IntPtr paramPtr) in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.Invoker.cs:line 529
at FlaxEngine.Interop.NativeInterop.InvokeMethod(ManagedHandle instanceHandle, ManagedHandle methodHandle, IntPtr paramPtr, IntPtr exceptionPtr) in F:\FlaxEngine\Source\Engine\Engine\NativeInterop.Unmanaged.cs:line 675
[ 00:56:45.352 ]: [Error] Exception has been thrown during Main thread action.
Invalid ManagedHandle