Skip to content

Commit

Permalink
Add comment explaining catch.
Browse files Browse the repository at this point in the history
  • Loading branch information
kring committed Sep 27, 2024
1 parent b233968 commit fcab7cd
Showing 1 changed file with 5 additions and 0 deletions.
5 changes: 5 additions & 0 deletions Reinterop~/CSharpObjectHandleUtility.cs
Original file line number Diff line number Diff line change
Expand Up @@ -52,6 +52,11 @@ public static void FreeHandle(IntPtr handle)
}
catch (ArgumentException e)
{
// The "GCHandle value belongs to a different domain" exception tends
// to happen on AppDomain reload, which is common in Unity.
// Catch the exception to prevent it propagating through our native
// code and blowing things up.
// See: https://github.com/CesiumGS/cesium-unity/issues/18
System.Console.WriteLine(e.ToString());
}
}
Expand Down

0 comments on commit fcab7cd

Please sign in to comment.