free

- Main Page
- Tutorials
- Functions
- Release Notes
- Examples

Functions
free
Complete List of ArrayFire Functions ArrayFire Functions by Category » Functions to create and modify Arrays » | Managing devices in ArrayFire

Free device memory allocated by ArrayFire's memory manager. More...

## Functions
AFAPI void | free (const void *ptr)
| Free device memory allocated by ArrayFire's memory manager. More...
AFAPI af_err | af_free_device (void *ptr)
| This function will free a device pointer even if it has been previously locked. More...

## Detailed Description

Free device memory allocated by ArrayFire's memory manager.

These calls free the device memory. These functions need to be called on pointers allocated using alloc function.

## Function Documentation

AFAPI af_err af_free_device | ( | void * | ptr | ) |

This function will free a device pointer even if it has been previously locked.

AFAPI void af::free | ( | const void * | ptr | ) |

Free device memory allocated by ArrayFire's memory manager.

These calls free the device memory. These functions need to be called on pointers allocated using alloc function.

Parameters

  [in] | ptr | the memory to free

This function will free a device pointer even if it has been previously locked.