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

Add new 'IObjectReference' tracking APIs #1849

Closed
wants to merge 18 commits into from

Conversation

Sergio0694
Copy link
Member

@Sergio0694 Sergio0694 commented Oct 26, 2024

Another take on #1474. This ports and adapts ReferenceTracker from ComputeSharp.
Main benefits:

  • Safe handling of native resources
  • Modern API surface matching .NET naming conventions for unsafe APIs (ie. "Unsafe" suffix)
  • Enable any number of concurrent callers as well as multiple/concurrent Dispose() calls

This PR only adds the new APIs. We can update all internal and generated uses in a follow up.

@Sergio0694 Sergio0694 added the gc Related to garbage collection label Oct 26, 2024
@Sergio0694 Sergio0694 requested a review from manodasanW October 26, 2024 18:52
@Sergio0694 Sergio0694 marked this pull request as ready for review October 26, 2024 18:54
@Sergio0694 Sergio0694 changed the base branch from master to staging/2.2 October 26, 2024 18:59
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/obj-ref-tracking branch from 4cf7522 to 2faa5ef Compare October 26, 2024 18:59
@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/obj-ref-tracking branch from cfebdfe to d025d82 Compare October 28, 2024 23:42
@Sergio0694 Sergio0694 marked this pull request as draft January 10, 2025 14:57
@manodasanW
Copy link
Member

Probably want to retarget staging/2.3

@Sergio0694
Copy link
Member Author

Yup! Will retarget and rebase after #1843 is merged 🙂

@Sergio0694 Sergio0694 force-pushed the user/sergiopedri/obj-ref-tracking branch from f0480fc to 602c79f Compare January 24, 2025 08:04
@Sergio0694 Sergio0694 changed the base branch from staging/2.2 to staging/2.3 January 24, 2025 08:04
@Sergio0694 Sergio0694 marked this pull request as ready for review January 24, 2025 08:04
@Sergio0694
Copy link
Member Author

This is actually not dependent on the .NET 9 target, so I've just rebased, retargeted and published it 😄

@Sergio0694
Copy link
Member Author

Closing this for now, moved to 3.0.

@Sergio0694 Sergio0694 closed this Feb 24, 2025
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
gc Related to garbage collection
Projects
None yet
Development

Successfully merging this pull request may close these issues.

3 participants