-1

During study Uart, I found this symbol ^ which immune to google. Here code that I can not understand:

array<object^>^ objectArray = SerialPort::GetPortNames();

https://youtu.be/cxgKTWTHX1w?t=304

273K
  • 29,503
  • 10
  • 41
  • 64

1 Answers1

0

That's the hat operator (aka handle to object operator) and is applicable for Microsoft's C++/CLI and C++/CX C++ language projections which is used to denote

that the declared object should be automatically deleted when the system determines that the object is no longer accessible.

It uses reference counting to keep track of when to be freed by the garbage collector.

Zoso
  • 3,273
  • 1
  • 16
  • 27