Hacker Newsnew | past | comments | ask | show | jobs | submitlogin

It's a bit hard to explain, but it's a copy constructor. Not sure of all the details right now, but I think when it is passes to another function (as a parameter), the reference count goes up, and when it returns (destructor), it goes down. I don't think it can be circular, as it uses types, not pointers. The basic idea is the data stays in the same place in memory.



Consider applying for YC's Fall 2025 batch! Applications are open till Aug 4

Guidelines | FAQ | Lists | API | Security | Legal | Apply to YC | Contact

Search: