On Sunday, 12 June 2016 at 14:29:19 UTC, Gary Willoughby wrote:
Another thing that is puzzling me is that when creating an instance of the above struct and passing as an argument to a function, the copy constructor is called and the reference count is incremented. This is expected. However, when the function returns, the destructor is called (on the copy) and the reference count lowered. How does the original instance know of the updated reference count from the copy?

Actually, this doesn't puzzle me at all! I think I must be tired. Ignore this paragraph, it doesn't make sense. lol.

Reply via email to