Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

Refactor WeakRefCollection to use List<WeakRefObject?> instead of ArrayList #8189

Merged
merged 3 commits into from
Nov 15, 2022

Conversation

Jericho
Copy link
Contributor

@Jericho Jericho commented Nov 14, 2022

Related: #8140

Microsoft Reviewers: Open in CodeFlow

@@ -30,10 +30,10 @@ public WeakRefCollection() : this(4)

Copy link
Member

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

As a thought exercise - what if changed to this?

internal class WeakRefCollection : List<WeakRefObject?>
{
    // ...
}

Copy link
Contributor Author

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

I don't think we can do this easily and within the scope of this PR but you should raise a new issue where this can be debated. Changing the interface (or the class derived from) most likely would mean overriding several new methods.

@RussKie RussKie added 📭 waiting-author-feedback The team requires more information from the author waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed labels Nov 15, 2022
@ghost ghost removed the 📭 waiting-author-feedback The team requires more information from the author label Nov 15, 2022
Copy link
Member

@JeremyKuhne JeremyKuhne left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Thanks!

@JeremyKuhne JeremyKuhne merged commit b15e52b into dotnet:main Nov 15, 2022
@ghost ghost added this to the 8.0 Preview1 milestone Nov 15, 2022
@Jericho Jericho deleted the GH-8140_WeakRefCollection branch November 15, 2022 21:06
@RussKie RussKie removed the waiting-on-team This work item needs to be discussed with team or is waiting on team action in order to proceed label Nov 16, 2022
@ghost ghost locked as resolved and limited conversation to collaborators Dec 16, 2022
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.
Labels
None yet
Projects
None yet
Development

Successfully merging this pull request may close these issues.

5 participants