3 ms·
“I have asked why he did not just write T t; and be done with it. He said that he is used to the T *t = new T(); syntax. Then I pointed out that he has a memory
by dbattaglia 6y ago
“I have asked why he did not just write T t; and be done with it. He said that he is used to the T *t = new T(); syntax. Then I pointed out that he has a memory leak. He replied that the runtime will take care of that. Too bad there isn't a runtime in C++ ...”
Yikes! I don’t know if I’d call this a “not using RAII” anti-pattern, it’s just sheer ignorance / incompetence of how the language works.