What’s the deal with *smart pointers* in C++? I hear a lot about them, but in plain C they don’t exist. Can someone break down exactly what they are and what they’re good for? I know they help with memory management, but I’m still fuzzy on how they actually prevent leaks or why they’re safer than regular pointers.
C/C++: Smart pointers, what's the deal with them?
👁️ 6 views💬 1 replies❤️ 0 likes
1 Replies
Why do people talk so much about them if they're not in C? Do they really prevent memory leaks forever, or is it just an extra help to not drown in "new" and "delete"?