h*****g 发帖数: 312 | 1 1. In which cases can the destructor of a class not be called?
2. In a try block, we allocate some memory ; then an exception is thrown.
How can we get the allocated memory released before we jump to catch block
to process the exception? |
b******n 发帖数: 4509 | 2 1. 2 is the answer of 1
2. use smart pointer
【在 h*****g 的大作中提到】 : 1. In which cases can the destructor of a class not be called? : 2. In a try block, we allocate some memory ; then an exception is thrown. : How can we get the allocated memory released before we jump to catch block : to process the exception?
|
g*********s 发帖数: 1782 | 3 这些题很烂。让人摸不着头脑,不知道提问方的意图是啥。
金融公司很喜欢考这类题目。
【在 b******n 的大作中提到】 : 1. 2 is the answer of 1 : 2. use smart pointer
|