If not, then does WinRT have its own Garbage Collector?
I ask this because I read this: "There's no need to manage the lifetime of underlying object. Windows releases the object when you're finished with the last of its class instances that yo开发者_运维百科u've activated." from MSDN.
They don't. WinRT doesn't use a garbage collector. Memory is managed with reference counting, IUnknown::AddRef() and IUnknown::Release(). Just like COM. And no, it isn't Windows that takes care of the counting, it is the language runtime support library. Javascript always used reference counting, C++ gets it from the C++/CX language extensions or by using smart pointer classes.
精彩评论