I'm new to Kotlin, but I have a strong Java background (Java is my day job). I love some of the shortcuts in Kotlin. One of them is File.appendText (). It is very convenient, IMO.
My question is about closing resources. If I used the author, I would do something like this:
out8.writer().use { ... }
But I donβt see anything directly in the appendText method, which indicates the closure of resources. Is Kotlin doing this behind the scenes for me, or is this something I should worry about differently?
Thank.
source
share