|
|
От: |
VladD2
|
www.nemerle.org |
| Дата: | 26.11.03 20:52 | ||
| Оценка: | |||
C++ managed classes can now have destructors, meaning C++ now has deterministic finalisation. The destructor implicitly implements the Dispose pattern of managed code and includes chaining, and is called when a stack-based object goes out of scope, a class member's enclosing object is destroyed or when delete is called. Having destructors means that the classic stack based pattern can be used, which means less try/catch/finally blocks and cleaner code.