---
title: removeFromParentNode()
framework: scenekit
role: symbol
role_heading: Instance Method
path: scenekit/scnnode/removefromparentnode()
---

# removeFromParentNode()

Removes the node from its parent’s array of child nodes.

## Declaration

```swift
func removeFromParentNode()
```

## Discussion

Discussion Removing nodes from the node hierarchy serves two purposes. Nodes own their contents (child nodes or attached lights, geometries, and other objects), so deallocating unneeded nodes can reduce memory usage. Additionally, SceneKit does more work at rendering time with a large, complex node hierarchy, so removing nodes whose contents you don’t need to display can improve rendering performance.

## See Also

### Managing the Node Hierarchy

- [parent](scenekit/scnnode/parent.md)
- [childNodes](scenekit/scnnode/childnodes.md)
- [addChildNode(_:)](scenekit/scnnode/addchildnode(_:).md)
- [insertChildNode(_:at:)](scenekit/scnnode/insertchildnode(_:at:).md)
- [replaceChildNode(_:with:)](scenekit/scnnode/replacechildnode(_:with:).md)
