Skip to content
Merged
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 @@ -841,7 +841,12 @@ private static void RegisterManagedObjectWrapperForDiagnostics(object instance,
List<ManagedObjectWrapperHolder> allWrappersForThisInstance = s_allManagedObjectWrapperTable.GetOrCreateValue(instance);
lock (allWrappersForThisInstance)
{
allWrappersForThisInstance.Add(wrapper);
// While this can be an O(n) search for an object that is exposed via N ComWrappers instances to native code
// in practice, N = 1 for the vast majority of scenarios.
if (!allWrappersForThisInstance.Contains(wrapper))
{
allWrappersForThisInstance.Add(wrapper);
}
Comment thread
jkoritzinsky marked this conversation as resolved.
}
}

Expand Down
Loading