|
|
|
|
|
by ncmncm
2555 days ago
|
|
Smart pointers make no difference to the time spent allocating and freeing memory. But we know that GC always imposes huge costs that point benchmarks uniformly fail to reveal. Often the costs are tolerable, or even negligible. At issue is the set of recourses available when they turn out not to be. |
|
In fact, it can be worse in Java because you have no control over whether an object lives on the stack instead of the heap.