Skip to content

Remove empty finalizers from bridge objects #12303

Description

@BrzVlad

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

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

No one assigned

    Labels

    Type

    No type

    Projects

    No projects

      Relationships

      None yet

      Development

      No branches or pull requests

      Issue actions