943,724 Members | Top Members by Rank

Ad:
  • C++ Discussion Thread
  • Marked Solved
  • Views: 2749
  • C++ RSS
Mar 25th, 2008
0

Stuipid Carrot Question

Expand Post »
After looking at compile errors because I was not overriding this function ( although being convinced that I was) I have a query for all you C++ buffs in the audiance. What does the ^ do in the following line.

C++ Syntax (Toggle Plain Text)
  1. virtual System::Object ^ Clone(void) override;

I know this is quite possably a stupid question and for that I am quite sorry.
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Mar 25th, 2008
0

Re: Stuipid Carrot Question

Ok, Replying to my own thread here, But I have had a look around the net and from what I can tell it refers to a reference to a managed type in .NET. I may be wrong ( since I have seen nothing that has said this yet )
Reputation Points: 21
Solved Threads: 10
Junior Poster
Paul.Esson is offline Offline
181 posts
since Feb 2005
Mar 25th, 2008
1

Re: Stuipid Carrot Question

As u said........ a caret [^] is a managed reference (usually called a handle in C++/CLI) is a reference to a managed .NET object. Managed object's lifetimes that are controlled by the .NET garbage collection system which needs to be able to track all references to managed objects. Having separate syntax for managed references / handles and regular native references helps makes this distinction explicit in the code and avoid confusion between managed / garbage collected .NET types and unmanaged native types whose lifetimes must still be managed explicitly by the programmer.
Reputation Points: 26
Solved Threads: 19
Posting Whiz in Training
Traicey is offline Offline
283 posts
since Mar 2008

This thread is solved

Either the thread starter or a moderator has marked this thread as solved. You can most likely trust the responses and answers given. There is most likely no reason for any further responses to be posted here. If you have a related question, please start a new thread in this forum instead.

This thread is more than three months old

No one has posted to this discussion for at least three months. Please let old threads die and do not reply to them unless you feel you have something new and valuable to contribute that absolutely must be added to make the discussion complete. Otherwise, please start a new thread in this forum instead.
Message:
Previous Thread in C++ Forum Timeline: What does " this " mean in c++ class
Next Thread in C++ Forum Timeline: Linked Lists in multiple classes





About Us | Contact Us | Advertise | Acceptable Use Policy
Forum Index | Build Custom RSS Feed


Follow us on Twitter


© 2011 DaniWeb® LLC