Does WinRT have Garbage Collection?
Or does it do reference counting as does COM?
Does WinRT have Garbage Collection?
Or does it do reference counting as does COM?
I found this article, which cites Microsoft's Martyn Lovell:
"WinRT objects are reference counted like COM for memory management, with weak references to avoid circularity."
Apparently this was mentioned at his talk on WinRT internals at the BUILD convention.
IUnknown
. And, yes, in Metro C++ apps using the new /Zw compiler syntax, instances of ref class
types are refcounted, using AddRef
/Release
. So are strings, though they have their own refcounting functions. Compile with /FAs
and see for yourself.
Commented
Sep 15, 2011 at 8:23