c++ - Exception handling -


I've heard that people say that exception handling is a bit expensive due to stacking online.

To get something, the stack is online, even if I put an exception and if I use "return" then where is the difference?

For example, if I have a memory problem which I can not handle - the only option is to stop the work till I reach this area where the problem is controlled or notified. So what is my second option to throw exceptions?

Instead of throwing an exception, I can use "return", but then it is the same. I know that stack unwaooded can also go back to six stacks, but so check the return value and "return" joint.

An explanation will be welcomed.

When you use returns, the stack is unconditionally "continuous", which A single "rate" machine code can be as simple as executing the instruction. Under exceptions, stack unglounce has to be searched for an appropriate exception handler, which is a very complex task. The exception is also the creation of an exception object and possibly a copy, which can not be trivial.


Comments

Popular posts from this blog

c# - How to capture HTTP packet with SharpPcap -

php - Multiple Select with Explode: only returns the word "Array" -

jquery - SimpleModal Confirm fails to submit form -