jamesjuett / lobster

Interactive Program Visualization Tools
8 stars 3 forks source link

Destructors at the end of the code don't run #353

Open zalhabash opened 9 months ago

zalhabash commented 9 months ago

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:

Bird dtor: 1
Bird dtor: 0