```scala
dataSource.foreach(_.close)
```