warning C6242: A jump out of this try-block forces local unwind
        Posted  
        
            by Benjamin
        on Stack Overflow
        
        See other posts from Stack Overflow
        
            or by Benjamin
        
        
        
        Published on 2010-04-02T11:26:34Z
        Indexed on 
            2010/04/02
            11:33 UTC
        
        
        Read the original article
        Hit count: 464
        
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?
© Stack Overflow or respective owner