---
title: "imp_removeBlock(_:)"
framework: Objective-C Runtime
role: symbol
role_heading: Function
platforms: [iOS 4.3+, iPadOS 4.3+, Mac Catalyst 13.1+, macOS 10.7+, tvOS 9.0+, visionOS 1.0+, watchOS 1.0+]
path: "objectivec/imp_removeblock(_:)"
---

# imp_removeBlock(_:)

Disassociates a block from an IMP that was created using imp_implementationWithBlock(_:), and releases the copy of the block that was created.

## Declaration

```swift
func imp_removeBlock(_ anImp: IMP) -> Bool
```

## Parameters

- `anImp`: An doc://com.apple.objectivec/documentation/ObjectiveC/IMP that was created using the doc://com.apple.objectivec/documentation/ObjectiveC/imp_implementationWithBlock(_:) function.

## Return Value

Return Value YES if the block was released successfully; otherwise, NO (for example, the function returns NO if the block was not used to create anImp previously).

## See Also

### Using Objective-C Language Features

- [objc_enumerationMutation(_:)](objectivec/objc_enumerationmutation(_:).md)
- [objc_setEnumerationMutationHandler(_:)](objectivec/objc_setenumerationmutationhandler(_:).md)
- [imp_implementationWithBlock(_:)](objectivec/imp_implementationwithblock(_:).md)
- [imp_getBlock(_:)](objectivec/imp_getblock(_:).md)
- [objc_loadWeak(_:)](objectivec/objc_loadweak(_:).md)
- [objc_storeWeak(_:_:)](objectivec/objc_storeweak(_:_:).md)
