use<R> method
R
use<R>(
- R action(
- T
Use the resource with automatic cleanup
Implementation
R use<R>(R Function(T) action) {
if (_disposed) {
throw OracleMemoryException('Resource has already been disposed');
}
try {
return action(resource);
} finally {
dispose();
}
}