, , . , ++? :
a) , , , , static. , , , , alloca.
b) , ++ new, , free() . .
c) Use C ++ newand delete. You should assume that the main C ++ allocator in the MSVC runtime runs as fast as if it is not identical to C-style system calls. Just remember that newthey deletedo more than allocate and free memory. They are not purely interchangeable with mallocand freeor other C-style distributions.
source
share