3 ms·
Smart pointers are as hard to manage as pointers. There are different kind of smart pointers and you gotta think what you want to do with them. A GC is easier.
by user5994461 10y ago
Smart pointers are as hard to manage as pointers.
There are different kind of smart pointers and you gotta think what you want to do with them. A GC is easier.
- wangchow 10y agoGC is certainly easier. However, it is important to understand the life-cycle of objects regardless. To be able to control them (if desired) is good because in many cases one would prefer to have that control instead of being forced to use garbage collector. In an ideal world, garbage collector makes sense because we don't want to have to worry about life-cycle management when we are solving other problems. Memory management can indeed be an annoying implementation detail, but as it stands there are certainly limiting factors in hardware which are impacted by generic object-management for specific application domains.