Hacker News new | past | comments | ask | show | jobs | submit login

I'll say this just once: smart pointers and reference counting are not the same thing, and neither of them implies the other.



Didn't need to say it at all. I probably wasn't being clear enough but I was referring to early versions that were called smart precisely because they removed the need for the programmer to count because they counted themselves. Hence 'smart'. Before boost and others cleaned it all up.

As others are pointing out they have advantages and disadvantages. It all depends on the situation. But they're certainly not free because they have a scope cost. Code size and simplifying compiler optimisation are important too. I think it's worth that pointing out.




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

Search: