use

inline fun <I : CPointed, O> CPointer<I>.use(action: (CPointer<I>) -> O): O

Use a pointer, then the pointer will be freed afterwards

Return

return the result from action

See also


inline fun <I : Any, O> StableRef<I>.use(action: (StableRef<I>) -> O): O

Use a StableRef, disposing of it afterwards

Return

return result from action

See also


inline fun <T : FreeMe, R> T.use(use: (T) -> R): R
inline fun <T : UnrefMe, R> T.use(use: (T) -> R): R