Closed JaiganeshKumaran closed 11 months ago
Unfortunately, this can't go anywhere without a maintainer to steward this feature.
https://github.com/microsoft/cppwinrt/blob/master/docs/contributing.md
I can reopen the issue if you'd like to discuss further.
Implements #1360.
Notes:
add_ref
andrelease_ref
, rather than(NonDelegating)AddRef/Release
.I have a scenario that requires this feature - where two objects dependent on each other need to have the same lifetime (one should not get deleted while other is alive).
weak_ref
won't work for this but by overriding AddRef/Release, I can share the reference count for both objects.