by Garoof · 13y ago · 0 comments
allocate_memory();
scope(failure) free_memory();
setup_interrupts();
scope(failure) teardown_interrupts();
setup_registers();
The scope keyword is for saying that if you get to this point, then do such and such at end of scope. scope(failure)/scope(success)/scope(exit), for exitting scope by exception/return/either. Is kind of nice.No comments yet.