Yield is a clever use of generators, right? It's very clever and also very nice because in you can have variables there that are needed for the cleanup. I would say avoid add Finalizer. Also, you can nest them. So leveraging using scopes. You can have like connect to a database by a session scope and then cleaning up the database as a function scope thing.