---
title: clearMemoryDescriptors
framework: kernel
role: pseudoSymbol
path: kernel/iointerleavedmemorydescriptor/1812566-clearmemorydescriptors
---

# clearMemoryDescriptors

Clear all of the IOMemoryDescriptors currently contained in and reset the IOInterleavedMemoryDescriptor.

## Declaration

```occ
virtual void clearMemoryDescriptors(
 IODirection direction = direction ); 
```

## Parameters

- `direction`: An I/O direction to be associated with the descriptor, which may affect the operation of the prepare and complete methods on some architectures.

## Overview

Overview Clears each IOMemoryDescriptor by completing (if needed) and releasing. The IOInterleavedMemoryDescriptor is then reset and may accept new descriptors up to the capacity specified when it was created.

## See Also

### Miscellaneous

- [complete](kernel/iointerleavedmemorydescriptor/1812579-complete.md)
- [getPhysicalSegment](kernel/iointerleavedmemorydescriptor/1812587-getphysicalsegment.md)
- [initWithCapacity](kernel/iointerleavedmemorydescriptor/1812598-initwithcapacity.md)
- [prepare](kernel/iointerleavedmemorydescriptor/1812608-prepare.md)
- [setMemoryDescriptor](kernel/iointerleavedmemorydescriptor/1812618-setmemorydescriptor.md)
- [withCapacity](kernel/iointerleavedmemorydescriptor/1812626-withcapacity.md)
