use

fun <T> TypedArray.use(block: (TypedArray) -> T): T

Invokes block, passing it the receiver and returning the value it returns. Recycles the receiver after block completes.

Return

Value returned by block.

Parameters

block

Lambda function accepting an instance of the receiver.