r/ProgrammerHumor • • 18d ago

Meme modernCppVsOldCpp

Post image
2.0k Upvotes

323 comments sorted by

View all comments

Show parent comment

5

u/Torebbjorn 18d ago

I would imagine that languages with a garbage collector will have no problems with circular references, since they typically work (partially) by starting from a root and marking all objects that you can get to, and deleting everything else. So a circular reference where no part of the circle is referenced anywhere else, will be collected.