A RetroSearch Logo

Home - News ( United States | United Kingdom | Italy | Germany ) - Football scores

Search Query:

Showing content from https://scala-lang.org/api/3.x/scala/util/Using$$Manager.html below:

Manager

scala.util.Using.Manager

See theManager companion object

A resource manager.

Resources can be registered with the manager by calling acquire; such resources will be released in reverse order of their acquisition when the manager is closed, regardless of any exceptions thrown during use.

See the main doc for Using for full details of suppression behavior.

Attributes
Note

It is recommended for API designers to require an implicit Manager for the creation of custom resources, and to call acquire during those resources' construction. Doing so guarantees that the resource must be automatically managed, and makes it impossible to forget to do so. Example:

class SafeFileReader(file: File)(implicit manager: Using.Manager)
  extends BufferedReader(new FileReader(file)) {
  def this(fileName: String)(implicit manager: Using.Manager) = this(new File(fileName))
  manager.acquire(this)
}
Companion
object
Source
Using.scala
Graph
Supertypes
Members list

Registers the specified resource with this manager, so that the resource is released when the manager is closed.

Registers the specified resource with this manager, so that the resource is released when the manager is closed.

Attributes
Source
Using.scala

Registers the specified resource with this manager, so that the resource is released when the manager is closed, and then returns the (unmodified) resource.

Registers the specified resource with this manager, so that the resource is released when the manager is closed, and then returns the (unmodified) resource.

Attributes
Source
Using.scala

RetroSearch is an open source project built by @garambo | Open a GitHub Issue

Search and Browse the WWW like it's 1997 | Search results from DuckDuckGo

HTML: 3.2 | Encoding: UTF-8 | Version: 0.7.4