> ## Documentation Index
> Fetch the complete documentation index at: https://devdocs.xbox.com/llms.txt
> Use this file to discover all available pages before exploring further.

# Evict

> Enables the page-out of data, which precludes GPU access of that data.

Enables the page-out of data, which precludes GPU access of that data.

## Syntax

```cpp theme={null}
HRESULT Evict(
    UINT NumObjects,
    ID3D12Pageable const  ppObjects
)
```

### Parameters

*NumObjects*<br />Type: UINT

The number of objects in the <i>ppObjects</i> array to evict from the device.

*ppObjects \[in]*<br />Type: ID3D12Pageable \*const \*

A pointer to a memory block that contains an array of [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public) interface pointers for the objects.

Even though most D3D12 objects inherit from [ID3D12Pageable](/reference/graphics/d3d12/interfaces/id3d12pageable/id3d12pageable_public), residency changes are only supported on the following objects: Descriptor Heaps, Heaps, Committed Resources, and Query Heaps

### Return value

Type: HRESULT

This method returns one of the [Direct3D 12 Return Codes](https://learn.microsoft.com/en-us/windows/desktop/direct3d12/d3d12-graphics-reference-returnvalues).

## Remarks

**Evict** persists the data associated with a resource to disk, and then removes the resource from the memory pool where it was located. This method should be called on the object which owns the physical memory: either a committed resource (which owns both virtual  and physical memory assignments) or a heap - noting that reserved resources do not have physical memory, and placed resources are borrowing memory from a heap.

Refer to the remarks for [MakeResident](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public).

## Requirements

**Header:** d3d12\_xs.h or d3d12\_x.h<br />**Library:** d3d12\_xs.lib or d3d12\_x.lib<br />**Supported Platforms**: XBOX Series consoles and XBOX One family

## See Also

[ID3D12Device](/reference/graphics/d3d12_x/interfaces/id3d12device/id3d12device)


## Related topics

- [MakeResident](/reference/graphics/d3d12/interfaces/id3d12device/methods/id3d12device_makeresident_public.md)
- [D3D12_FEATURE_DATA_GPU_VIRTUAL_ADDRESS_SUPPORT](/reference/graphics/d3d12/structs/d3d12_feature_data_gpu_virtual_address_support_public.md)
