Skip to content

Add new 'IObjectReference' tracking APIs - #1849

Closed
Sergio Pedri (Sergio0694) wants to merge 18 commits into
staging/2.3from
user/sergiopedri/obj-ref-tracking
Closed

Sergio Pedri (Sergio0694) wants to merge 18 commits into
staging/2.3from
user/sergiopedri/obj-ref-tracking

Conversation

@Sergio0694

@Sergio0694 Sergio Pedri (Sergio0694) commented Oct 26, 2024 •

Copy link
Copy Markdown
Member

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 Sergio Pedri (Sergio0694) added the gc Related to garbage collection label Oct 26, 2024
@Sergio0694
Sergio Pedri (Sergio0694) marked this pull request as ready for review October 26, 2024 18:54
@Sergio0694
Sergio Pedri (Sergio0694) changed the base branch from master to staging/2.2 October 26, 2024 18:59
@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/obj-ref-tracking branch from 4cf7522 to 2faa5ef Compare October 26, 2024 18:59
Comment thread src/WinRT.Runtime/ObjectReference.ReferenceTracking.cs Outdated
@Sergio0694
Sergio Pedri (Sergio0694) force-pushed the user/sergiopedri/obj-ref-tracking branch from cfebdfe to d025d82 Compare October 28, 2024 23:42
@Sergio0694
Sergio Pedri (Sergio0694) marked this pull request as draft January 10, 2025 14:57
@manodasanW

Copy link
Copy Markdown
Member

Probably want to retarget staging/2.3

@Sergio0694

Copy link
Copy Markdown
Member Author

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

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

Copy link
Copy Markdown
Member Author

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

@Sergio0694

Copy link
Copy Markdown
Member Author

Closing this for now, moved to 3.0.

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