What's the problem when deconstructor does garbage collection ??
In my class, I have a vector allocated on the heap, and therefore I need to delete it after a while. But doing that by the deconstructor gives me unexpected result. While when I do garbage collection by an explicit function (like one I made, garbage_collector()), it works fine. WHY ? And how can I fix it so it can be done by deconstructor? (Check out my code between lines 171 to 187) https://code.sololearn.com/cd7JIdLQ2eZt/?ref=app