You weren’t thinking that I was talking about something else were you? Some people might call the ^ a carat, but in our world, it is a hat. Use the “Hat” or ^ only if you are using with Windows Runtime Objects or are creating a Windows Runtime component.
(Keep in mind that there are WinRT API objects AND WinRT objects that you create, or I create).
Why use the “Hat” or “^” ? Seriously, it’s garbage. Really that is why, you use it to do garbage collection or automatic deletion for those of you that get a twitch whenever Microsoft mentions garbage collection. See you DON’T have to use the Garbage Collection or Automatic Deletion for anything other than WinRT, all other C++ function just like you would expect it to.
This means you use the “Hat” or “^” instead of AddRef or Release with Windows Runtime, but it might be confusing about the difference between C++ and C#/VB. As expected C++/CX compile directly to run directly on the CPU. C#/VB compile to the MS intermediate language and execute in the Common Language Runtime (CLR). And then JavaScript simply execute in the run-time. VB, C# and C++ all communicate with the run-time presentation through the Application Binary Interface.
So what about C? Yeah, there is way to use C. I don’t want to talk about that right now, ok?
Then there is the Windows Metadata (.winmd) files, just to confuse everyone
WTF, or What’s the file? The file is .winmd, which compiled at the same time as the Metro App. Since JavaScript, C# and VB don’t know what C++ is doing when you use regular classes, arrays, templates or STL containers, .winmd makes the connection.
Wow a lot of stuff to learn about.