PyCon 2019 in Cleveland, Ohio

Saturday 1:40 p.m.–2:25 p.m. in Grand Ballroom A

Time to take out the rubbish: garbage collector

Pablo Galindo Salgado


One of the reasons why programming in Python is very straightforward and simple is that we do not have to worry about the lifetime of our objects. That is, once it ceases to be necessary, a variable disappears from the memory "magically". The fact that this happens automatically can erroneously lead us to believe that it is not required to worry about what happens behind the scenes. Nothing is further from reality: knowing how Python manages memory is fundamental in specific scenarios, and not knowing what is happening can have consequences as significant as unpleasant. For example, if our programs manage a large amount of data at the same time or launch multiple processes in parallel, this ceases to be a theoretical issue and becomes something that we, logical minds, also care. Although these concepts tend to be considered advanced and difficult to understand, we will see that this is not the case. This topic is not a purely theoretical matter nor is it difficult to find its practical applications. In this talk, we will explain why it is something that should matter to us, and we will talk about how to apply the knowledge we have gained to specific problems.