<!--
{
  "availability" : [
    "*: -",
    "DriverKit: -"
  ],
  "documentType" : "symbol",
  "framework" : "NetworkingDriverKit",
  "identifier" : "/documentation/NetworkingDriverKit/IOUserNetworkPacketBufferPool/DeallocatePackets-186ya",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "NetworkingDriverKit"
    ],
    "preciseIdentifier" : "c:@S@IOUserNetworkPacketBufferPool@F@DeallocatePackets#**$@S@IOUserNetworkPacket#i#"
  },
  "title" : "DeallocatePackets"
}
-->

# DeallocatePackets

Disposes of any resources associated with the specified packets and makes them available for reuse.

```
virtual kern_return_t DeallocatePackets(IOUserNetworkPacket **packets, uint32_t packetsCount);
```

## Parameters

`packets`

An array of packets to deallocate. It is a programmer error to specify `NULL` or an invalid pointer for this parameter.

`packetsCount`

The number of items in the `packets` parameter.

## Return Value

`kIOReturnSuccess` on success, or another value if an error occurred.

## Discussion

After you move one or more packets to the appropriate completion queue, call this method to recycle those packets. Recycling packets makes them available for use with new incoming or outgoing packets.

---

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)