I have faced with some problem. When "stepping over" closing brace of block, where object was created, the destructor isn't executed.
} <--stepping over this brace causes this behavior
Class TCritSect is defined as follows:
TCritSect () //disables interrupts, save IMASK
StatusReg = cli();
~TCritSect() //restores IMASK
volatile unsigned int StatusReg;
Skipping of destructor leave interrupts disabled. When "stepping into" on the closing brace the debugger goes to destructor, executes it and interrupt are reenabled.