---
title: complete
framework: kernel
role: symbol
role_heading: Instance Method
path: kernel/iomemorydescriptor/1442043-complete
---

# complete

Complete processing of the memory after an I/O transfer finishes.

## Declaration

```occ
virtual IOReturn complete(IODirection forDirection);
```

## Parameters

- `forDirection`: DEPRECATED The direction of the I/O just completed, or kIODirectionNone for the direction specified by the memory descriptor.

## Return Value

Return Value An IOReturn code.

## Discussion

Discussion This method should not be called unless a prepare was previously issued; the prepare() and complete() must occur in pairs, before and after an I/O transfer involving pageable memory. In 10.3 or greater systems the direction argument to complete is not longer respected. The direction is totally determined at prepare() time.

## See Also

### Preparing the Buffer

- [prepare](kernel/iomemorydescriptor/1812845-prepare.md)
- [prepare](kernel/iomemorydescriptor/1442024-prepare.md)
- [complete](kernel/iomemorydescriptor/1812740-complete.md)
- [getPreparationID](kernel/iomemorydescriptor/1441964-getpreparationid.md)
- [setPreparationID](kernel/iomemorydescriptor/1442011-setpreparationid.md)
