Skip to content

Commit cf429dd

Browse files
authored
Update 1.2.cpp
1 parent 9ddebf5 commit cf429dd

File tree

1 file changed

+2
-2
lines changed

1 file changed

+2
-2
lines changed

Exams/Final/1st/1.2.cpp

Lines changed: 2 additions & 2 deletions
Original file line numberDiff line numberDiff line change
@@ -12,7 +12,7 @@ If you call destructor explicitly and then let object go out of scope, destructo
1212
Placement new allows constructing an object at a preallocated memory address; then explicit destructor is safe.
1313
1414
Example:
15-
15+
*/
1616
#include <iostream>
1717
#include <new> // for placement new
1818
using namespace std;
@@ -40,4 +40,4 @@ Destructor called
4040

4141

4242
Note: The final destructor corresponds to the object that exists at end of scope. If you explicitly destroyed t and then did not re-construct, the automatic destructor at scope exit would run on an already-destroyed object → UB. So be careful.
43-
*/
43+

0 commit comments

Comments
 (0)