Have you overloaded operator new in C++?
If yes, why?
An interview question, for which I humbly request some of your thoughts.
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.
We had an embedded system where
newwas only rarely allowed, and the memory could never be deleted, as we had to prove a maximum heap usage for reliability reasons.We had a third party library developer who didn’t like those rules, so they overloaded
newanddeleteto work against a chunk of memory we allocated just for them.