# tff.program.MemoryReleaseManager

<br />

|---|
| [![](https://www.tensorflow.org/images/GitHub-Mark-32px.png) View source on GitHub](https://github.com/tensorflow/federated/blob/v0.87.0 Version 2.0, January 2004 Licensed under the Apache License, Version 2.0 (the) |

A [`tff.program.ReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/ReleaseManager) that releases values to memory.

Inherits From: [`ReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/ReleaseManager)

    tff.program.MemoryReleaseManager()

A [`tff.program.MemoryReleaseManager`](https://www.tensorflow.org/federated/api_docs/python/tff/program/MemoryReleaseManager) is a utility for releasing values from a
federated program to memory and is used to release values from platform
storage to customer storage in a federated program.

Values are released to memory as Python objects. When the value is released,
if the value is a value reference or a structure containing value references,
each value reference is materialized.

## Methods

### `release`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    release(
        value, key
    )

Releases `value` from a federated program.

<br />

<br />

<br />

| Args ||
|---|---|
| `value` | A [`tff.program.ReleasableStructure`](https://www.tensorflow.org/federated/api_docs/python/tff/program#ReleasableStructure) to release. |
| `key` | A hashable value used to reference the released `value`. |

<br />

### `remove_all`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    remove_all() -> None

Removes all program states.

### `values`

[View source](https://github.com/tensorflow/federated/blob/v0.87.0
Version 2.0, January 2004
Licensed under the Apache License, Version 2.0 (the)

    values() -> collections.OrderedDict[Hashable, release_manager.ReleasableStructure]

Returns an `collections.OrderedDict` of all keys and released values.