Do one need to worry about using set_new_handlers in conjunction with smart or auto pointer’s or the libraries come packed with handlers with refined error handling?
Thanks
Sign Up to our social questions and Answers Engine to ask questions, answer people’s questions, and connect with other people.
Login to our social questions & Answers Engine to ask questions answer people’s questions & connect with other people.
Lost your password? Please enter your email address. You will receive a link and will create a new password via email.
Please briefly explain why you feel this question should be reported.
Please briefly explain why you feel this answer should be reported.
Please briefly explain why you feel this user should be reported.
The smart pointers that come with C++ (currently just
auto_ptr, but soon includingshared_ptrandweak_ptr) all usenewby default, so they’ll interface with the global new handler automatically. You don’t need to do anything special to ensure that the new handler is invoked when using these classes.Hope this helps!