3 ms·
As well as smart pointers as others have mentioned, standard library containers (other than smart pointers) are another way to handle dynamic allocations in cer
by chlorion 5y ago
As well as smart pointers as others have mentioned, standard library containers (other than smart pointers) are another way to handle dynamic allocations in certain situations. The vector container is probably the best example here, it alone provides massive safety and usability benefits over using new or malloc directly!