|
|
|
|
|
by pjmlp
270 days ago
|
|
This is exactly how C++/WinRT works, because people praising reference counting as GC algorithm often forget about possible stack overflows (if the destructor/Drop trait is badly written), or stop-the-world pauses when there is a domino effect of a reference reaching zero in a graph or tree structure. So in C++/WinRT, which is basically the current C++ projection for COM and WinRT components, the framework moves the objects into a background thread before deletion, as such that those issues don't affect the performance of the main execution thread. And given it is done by the same team, I would bet Rust/Windows-rs has the same optimization in place for COM/WinRT components. |
|