Gotcha: C++/WinRT weak_ref.get() doesn’t get the weak reference; it gets the strong reference
Источник: The Old New Thing
Источник: The Old New Thing
The Old New Thing
Gotcha: C++/WinRT weak_ref.get() doesn't get the weak reference; it gets the strong reference - The Old New Thing
If you have a winrt::com_ptr<T>, you can call the get() method to obtain the raw COM pointer inside it. This is handy if you need to pass that raw pointer along to another method that wants raw pointers. The winrt::weak_ref<T> also has a get() method,