You can do some kind of RAII in python with the with keyword. Only works for local variables though, where it's easy to free resources manually
you are viewing a single comment's thread
view the rest of the comments
view the rest of the comments
replies: