Skip to content
Draft
Changes from all commits
Commits
File filter

Filter by extension

Filter by extension

Conversations
Failed to load comments.
Loading
Jump to
Jump to file
Failed to load files.
Loading
Diff view
Diff view
Original file line number Diff line number Diff line change
Expand Up @@ -42,7 +42,8 @@ internal static void Initialize ()
{
var instance = new TrimmableTypeMap ();
var previous = Interlocked.CompareExchange (ref s_instance, instance, null);
Debug.Assert (previous is null, "TrimmableTypeMap must only be created once.");
if (previous is not null)
return;

instance.RegisterNatives ();
}
Expand Down