<!--
{
  "availability" : [
    "iOS: 8.0.0 - 26.0.0",
    "iPadOS: 8.0.0 - 26.0.0",
    "macCatalyst: 13.1.0 - 26.0.0",
    "macOS: 10.8.0 - 26.0.0",
    "tvOS: 9.0.0 - 26.0.0",
    "visionOS: 1.0.0 - 26.0.0",
    "watchOS: 3.0.0 - 26.0.0"
  ],
  "documentType" : "symbol",
  "framework" : "SceneKit",
  "identifier" : "/documentation/SceneKit/SCNShadable/handleUnbinding(ofSymbol:handler:)",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "SceneKit"
    ],
    "preciseIdentifier" : "c:objc(pl)SCNShadable(im)handleUnbindingOfSymbol:usingBlock:"
  },
  "title" : "handleUnbinding(ofSymbol:handler:)"
}
-->

# handleUnbinding(ofSymbol:handler:)

Specifies a block to be called after rendering with programs with the specified GLSL uniform variable or attribute name.

```
optional func handleUnbinding(ofSymbol symbol: String, handler block: SCNBindingBlock? = nil)
```

## Parameters

`symbol`

A GLSL uniform variable or attribute name.

`block`

A block to be called by SceneKit.

## Discussion

Use this method to associate a block with a SceneKit object (geometry or material) to handle cleanup related to an attribute or uniform variable in a custom [`SCNProgram`](/documentation/SceneKit/SCNProgram) shader associated with that object. SceneKit will call your block after rendering the object. In the block, you can execute any OpenGL commands or other code necessary for post-rendering tasks.

This method is for OpenGL shader programs only. To bind custom variable data for Metal shader programs, use the [`handleBinding(ofBufferNamed:frequency:handler:)`](/documentation/SceneKit/SCNProgram/handleBinding(ofBufferNamed:frequency:handler:)) method.

---

Copyright &copy; 2026 Apple Inc. All rights reserved. | [Terms of Use](https://www.apple.com/legal/internet-services/terms/site.html) | [Privacy Policy](https://www.apple.com/privacy/privacy-policy)