HH\Lib\IO\CloseableHandle::closeWhenDisposed

Close the handle when the returned disposable is disposed

public function closeWhenDisposed(): IDisposable;

Usage: using $handle->closeWhenDisposed();

Returns