# Pools.SimplePool

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  
belongs to Maven artifact com.android.support:support-compat:28.0.0-alpha1  
Summary:[Ctors](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#pubctors)\|[Methods](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#pubmethods)\|[Inherited Methods](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#inhmethods)\|[\[Expand All\]](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#)  

# Pools.SimplePool

| This package is part of the Android[support library](https://developer.android.com/topic/libraries/support-library)which is no longer maintained. The support library has been superseded by[AndroidX](https://developer.android.com/jetpack/androidx)which is part of[Jetpack](https://developer.android.com/jetpack). We recommend using the AndroidX libraries in all new projects. You should also consider[migrating](https://developer.android.com/jetpack/androidx/migrate)existing projects to AndroidX. To find the AndroidX class that maps to this deprecated class, see the AndroidX support library[class mappings](https://developer.android.com/jetpack/androidx/migrate/class-mappings).

`
public
static


class
Pools.SimplePool
`  
`

extends Object


``


implements

`[Pool](https://developer.android.com/reference/android/support/v4/util/Pools.Pool)`<T>


`

|---|-----------------------------------------------|
| java.lang.Object                                 ||
| ↳ | android.support.v4.util.Pools.SimplePool\<T\> |

|--------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------------|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#)Known Direct Subclasses [Pools.SynchronizedPool](https://developer.android.com/reference/android/support/v4/util/Pools.SynchronizedPool)\<T\> |-----------------------------------------------------------------------------------------------------------------------|--------------------------------| | [Pools.SynchronizedPool](https://developer.android.com/reference/android/support/v4/util/Pools.SynchronizedPool)\<T\> | Synchronized) pool of objects. | |

<br />

*** ** * ** ***

Simple (non-synchronized) pool of objects.

## Summary

|                                                                           ### Public constructors                                                                            ||
|---------------------------------------------------------------------------------------------------------------------------------------------------------------------------|---|
| ` `[Pools.SimplePool](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#Pools.SimplePool(int))`(int maxPoolSize) ` Creates a new instance. |

|                                                                          ### Public methods                                                                           ||
|------------|-----------------------------------------------------------------------------------------------------------------------------------------------------------|
| ` T`       | ` `[acquire](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#acquire())`() `                                             |
| ` boolean` | ` `[release](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#release(T))`(T instance) ` Release an instance to the pool. |

| ### Inherited methods |
|-----------------------|---|
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#)From class` java.lang.Object ` |-------------------|-------------------------------| | ` Object`         | ` clone() `                   | | ` boolean`        | ` equals(Object arg0) `       | | ` void`           | ` finalize() `                | | ` final Class<?>` | ` getClass() `                | | ` int`            | ` hashCode() `                | | ` final void`     | ` notify() `                  | | ` final void`     | ` notifyAll() `               | | ` String`         | ` toString() `                | | ` final void`     | ` wait(long arg0, int arg1) ` | | ` final void`     | ` wait(long arg0) `           | | ` final void`     | ` wait() `                    | ||
| [![](https://developer.android.com/static/assets/images/styles/disclosure_down.png)](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool#)From interface` `[android.support.v4.util.Pools.Pool](https://developer.android.com/reference/android/support/v4/util/Pools.Pool)` ` |---------------------|-----------------------------------------------------------------------------------------------------------------------------------------------------| | ` abstract T`       | ` `[acquire](https://developer.android.com/reference/android/support/v4/util/Pools.Pool#acquire())`() `                                             | | ` abstract boolean` | ` `[release](https://developer.android.com/reference/android/support/v4/util/Pools.Pool#release(T))`(T instance) ` Release an instance to the pool. | ||

## Public constructors

### Pools.SimplePool

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
Pools.SimplePool (int maxPoolSize)
```

Creates a new instance.

<br />

|                   Parameters                    ||
|---------------|----------------------------------|
| `maxPoolSize` | `int`: The max pool size. <br /> |

|                               Throws                                ||
|----------------------------|-----------------------------------------|
| `IllegalArgumentException` | If the max pool size is less than zero. |

## Public methods

### acquire

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
T acquire ()
```

<br />

<br />

|   Returns   ||
|-----|--------|
| `T` | <br /> |

### release

added in[version 22.1.0](https://developer.android.com/topic/libraries/support-library/revisions)  

```
boolean release (T instance)
```

Release an instance to the pool.

<br />

|                    Parameters                    ||
|------------|--------------------------------------|
| `instance` | `T`: The instance to release. <br /> |

|                           Returns                           ||
|-----------|--------------------------------------------------|
| `boolean` | Whether the instance was put in the pool. <br /> |

-

  ## Interfaces

  - [Pools.Pool](https://developer.android.com/reference/android/support/v4/util/Pools.Pool)
-

  ## Classes

  - [ArrayMap](https://developer.android.com/reference/android/support/v4/util/ArrayMap)
  - [ArraySet](https://developer.android.com/reference/android/support/v4/util/ArraySet)
  - [AtomicFile](https://developer.android.com/reference/android/support/v4/util/AtomicFile)
  - [CircularArray](https://developer.android.com/reference/android/support/v4/util/CircularArray)
  - [CircularIntArray](https://developer.android.com/reference/android/support/v4/util/CircularIntArray)
  - [LongSparseArray](https://developer.android.com/reference/android/support/v4/util/LongSparseArray)
  - [LruCache](https://developer.android.com/reference/android/support/v4/util/LruCache)
  - [ObjectsCompat](https://developer.android.com/reference/android/support/v4/util/ObjectsCompat)
  - [Pair](https://developer.android.com/reference/android/support/v4/util/Pair)
  - [PatternsCompat](https://developer.android.com/reference/android/support/v4/util/PatternsCompat)
  - [Pools](https://developer.android.com/reference/android/support/v4/util/Pools)
  - [Pools.SimplePool](https://developer.android.com/reference/android/support/v4/util/Pools.SimplePool)
  - [Pools.SynchronizedPool](https://developer.android.com/reference/android/support/v4/util/Pools.SynchronizedPool)
  - [SimpleArrayMap](https://developer.android.com/reference/android/support/v4/util/SimpleArrayMap)
  - [SparseArrayCompat](https://developer.android.com/reference/android/support/v4/util/SparseArrayCompat)