Hello, I am using auto_ptr for the first time in a large project, but I have a question. How does an auto_ptr knows when to use delete[] or delete? I am using in like this:

Code:
auto_ptr<char> buffer(new char[buff_size]);
In this case, auto_ptr should delete de pointer with delete[].

What about:

Code:
auto_ptr<AnObject> buffer(new AnObject);
Thanks any insight.