A
Alexander Adam
Hi!
Is there an efficient way to "shorten" an array with C++ Operators
without the need to delete it, then reallocate it? I've thought about
using reallocate which might do the job but its C and besides that I
am using C++ operators new [] and delete [].
Besides, would it be faster to use malloc() and free() instead of new
[] and delete [] ? I can make sure that the types used for those
operations will be simple types (most of the time an unsigned char)
only so no constructors / destructors stuff etc.
Thanks + Regards
Alex
Is there an efficient way to "shorten" an array with C++ Operators
without the need to delete it, then reallocate it? I've thought about
using reallocate which might do the job but its C and besides that I
am using C++ operators new [] and delete [].
Besides, would it be faster to use malloc() and free() instead of new
[] and delete [] ? I can make sure that the types used for those
operations will be simple types (most of the time an unsigned char)
only so no constructors / destructors stuff etc.
Thanks + Regards
Alex