← Back to context

Comment by hawk_

3 years ago

Cleaners aren't deterministic, so that's meaningfully worse than rust's resource mgt. Java's try with resources cleanup only works if the resource is freed up before the callstack is unwound. Currently that's only viable for the most trivial of scenarios. Loom will make that applicable in more places but still not as widely applicable as a borrow checker/rc based deterministic resource management.