Andrey said about try-with-resources as a dedicated language feature. use() standard library function have been available for a long time.
Related topics
| Topic | Replies | Views | Activity | |
|---|---|---|---|---|
|
C# using() in Kotlin
|
2 | 4491 | October 25, 2012 | |
| [SOLVED] Try with resources with `AutoClosable` | 3 | 6507 | December 7, 2017 | |
|
Try-with-resources: the Kotlin way?
|
5 | 7925 | November 21, 2014 | |
| Concise way to manage resource with exception in kotlin | 11 | 10675 | December 5, 2017 | |
| Kotlin needs try-with-resources | 56 | 38818 | September 10, 2020 |