---
title: dispatch_get_context
framework: dispatch
role: symbol
role_heading: Function
path: dispatch/dispatch_get_context
---

# dispatch_get_context

Returns the application-defined context of an object.

## Declaration

```occ
extern void *dispatch_get_context(dispatch_object_t object);
```

## Parameters

- `object`: This parameter cannot be NULL.

## Return Value

Return Value The context of the object; can be NULL.

## Discussion

Discussion Your application can associate custom context data with the object, to be used only by your application. Your application must allocate and deallocate the data as appropriate.

## See Also

### Updating Contextual Data

- [dispatch_set_context](dispatch/dispatch_set_context.md)
