Hacker News new | ask | show | jobs
by progmetaldev 660 days ago
Isn't it also possible for other logic to run in a destructor, such as freeing pointers to external resources? Doesn't this cause (at the very least) the possibility for more advanced logic to be run beyond freeing the object's own memory?
1 comments

Yes, it usually is. See, e.g., smart pointers.