3 ms·
Agree with @czinck. It works, it does the job, but it's not as fool proof as: { Type obj; // do stuff } // obj destructor just ran
by EpicEng 12y ago
Agree with @czinck. It works, it does the job, but it's not as fool proof as:
{
Type obj;
// do stuff
}
// obj destructor just ran
C# and other languages have similar paradigms, but they require more attention to detail than a destructor does.