use

inline fun <T : ReferenceCounted?, R> T.use(block: (T) -> R): R