Garbage Collection


We may have the following scenario when deleting a singly linked list or doubly linked list: “In order to delete a node from linked List, I am just pointing to the next pointer”

Will the not pointed elements be deleted by itself or should we pay extra attention?


A quick answer can be found HERE

A more comprehensive answer can be found HERE.

Python garbage collection

Python garbage collection can be found HERE.

Thanks for reading and I hope it is helpful.



Get the Medium app

A button that says 'Download on the App Store', and if clicked it will lead you to the iOS App store
A button that says 'Get it on, Google Play', and if clicked it will lead you to the Google Play store