T
Tim H
I have need of a temporary local array (yes it must be an array in
order to pass down to a C API).
I want to do this:
auto_ptr<char> my_data(new char[size]);
memcpy(my_data.get(), data, size);
Is this safe? I know you should not hold auto_ptr to arrays, but is
it OK if it is an array of primitive types?
If not, what;s the alternative?
Tim
order to pass down to a C API).
I want to do this:
auto_ptr<char> my_data(new char[size]);
memcpy(my_data.get(), data, size);
Is this safe? I know you should not hold auto_ptr to arrays, but is
it OK if it is an array of primitive types?
If not, what;s the alternative?
Tim