For example, in the exercise from Section 1: Memory Model and the Heap in Async Lecture 13 (dynamic memory), students are asked to use the lobster simulation to check the answer. There are custom destructors that cout to console when they are run. However, lobster prints out an incomplete result. The last two destructors for b1 and b_global don't run, so these last two lines don't print:
For example, in the exercise from Section 1: Memory Model and the Heap in Async Lecture 13 (dynamic memory), students are asked to use the lobster simulation to check the answer. There are custom destructors that cout to console when they are run. However, lobster prints out an incomplete result. The last two destructors for b1 and b_global don't run, so these last two lines don't print: