Remove empty finalizers from bridge objects
- Dominant language
- C#
- Stars
- 2.1k
- Forks
- 579
- Avg merge
- 1d 19h
- Merged PRs (30d)
- 252
Description
Mono required bridge objects to have a finalizer so that they can be iterated during GC. For CoreCLR we use a completely different mechanism, by having explicit gc handles registered for all these objects. This means that, for CoreCLR, finalizers just add unnecessary overhead. I believe we should be able to remove them once mono support is dropped from this repository, probably for .net12.
Example: https://github.com/dotnet/android/blob/main/src/Mono.Android/Java.Lang/Object.cs#L32
Contributor guide
No contributing guide indexed for this repository
Research direction
Start with src/Mono.Android/Java.Lang/Object.cs and inspect the other bridge objects for finalizers, then trace how CoreCLR registers their explicit GC handles. Confirm the scope is limited to code that no longer needs Mono support and identify existing validation for bridge-object garbage collection before removing the finalizers.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- csharp
- Domain
- mobile-dev
- Issue type
- Refactor
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Quiet
- Clarity
- Mostly clear
- Newbie friendliness
- 48/100