Python (or rather, the default CPython implementation) uses reference counting. When an object that contains a reference to another object - or contains a list that itself has a reference to an object - is deleted or goes out of scope, then the reference count of that object is decreased. When the reference count of an object gets to 0, it is garbage collected. So if your list is the only reference to those objects, they will be deleted when their holder is - but if other variables also hold references, they will not be.
A couple of points though. Firstly, you should very rarely be worrying about this. Python memory management is automatic, and memory leaks are quite hard to achieve (although not impossible).
Secondly, as delnan points out in the comment, __del__
is very definitely not the right way to go about it. __del__
is called automatically by Python (although it is not guaranteed to be called only once, or indeed at all), and the very fact that you have defined it is more likely to lead to memory leaks than if you had just left it undefined.