---
title: cancelGeocode()
framework: corelocation
role: symbol
role_heading: Instance Method
path: corelocation/clgeocoder/cancelgeocode()
---

# cancelGeocode()

Cancels a pending geocoding request.

## Declaration

```swift
func cancelGeocode()
```

## Discussion

Discussion You can use this method to cancel a pending request and free up the resources associated with that request. Canceling a pending request causes the completion handler block to be called. If the request is not pending, because it has already returned or has not yet begun, this method does nothing.

## See Also

### Managing geocoding requests

- [isGeocoding](corelocation/clgeocoder/isgeocoding.md)
