|
|
|
|
|
by enjo
546 days ago
|
|
>One idea is merely a form of control flow (like 'if' or 'goto') that could jump down the call stack. Interestingly this is more or less how Symbian handled exceptions back in the day. It was a giant mess. You basically called setjmp in a surrounding function (using a macro IIRC) and then longjmp (in the form of user::leave()) which unwound the stack without calling any destructors. It was very fast and the source of endless memory leaks. |
|
It was also before RAII was a thing and so you had to manage the ‘CleanupStack’ [0] yourself.
At least for the development of the OS itself, and not frameworks such as the awful Series60 UI, we had have unit tests that brute forced memory correctness by getting the memory allocator to deliberately fail at each next step of the code being developed until it succeeded or panicked.
[0] http://devlib.symbian.slions.net/s3/GUID-E7D29464-05E1-5039-...