microsoft / cppwinrt

C++/WinRT
MIT License
1.64k stars 236 forks source link

Complete customisation of reference counting #1365

Closed JaiganeshKumaran closed 11 months ago

JaiganeshKumaran commented 11 months ago

Implements #1360.

Notes:

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.

kennykerr commented 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.