warning C6242: A jump out of this try-block forces local unwind
- by Benjamin
When we use SEH with __finally block,
if we do return in __try block, it causes a local unwind.
To Local unwind, the system need to approximately 1000 instructions.
The local unwind causes a warning C6242. MSDN suggests using __leave keyword(with saving a return value).
But I don't think it's a good idea.
If we save a return value and leave the block, there will be many mistakes.
Is the waring really necessary?
What do you prefer?