josemendez,
Am I understand you right that if Oni.UnpinMemory called twice this leads to crash?
Is there a way to debug it. For example to get Error when it is called twice or something like this?
Because I get another crash, less often. And would be great to have some way to get assert or error in case if memory get corrupted
Update:
I added this code to UnpinMemory function. Will try to locale the problem
Am I understand you right that if Oni.UnpinMemory called twice this leads to crash?
Is there a way to debug it. For example to get Error when it is called twice or something like this?
Because I get another crash, less often. And would be great to have some way to get assert or error in case if memory get corrupted
Update:
I added this code to UnpinMemory function. Will try to locale the problem
Code:
public static void UnpinMemory(GCHandle handle)
{
if (handle.IsAllocated && _AllUnlinnedHandles.Contains(handle))
{
Debug.LogError("Trying to UnpinMemory for already unpinned handler");
return;
}
if (handle.IsAllocated)
{
_AllUnlinnedHandles.Add(handle);
handle.Free();
}
}