The problem with such an approach is that you don'...
# announcements
o
The problem with such an approach is that you don't have direct references to all your Closeables, and you'd have to query a collection to get a hold of them. And even then you'd have to cast to be able to use them as their specific type, which is not type safe. The best approach I have seen so far is in the response by @orangy here: https://discuss.kotlinlang.org/t/kotlin-needs-try-with-resources/214