<!--
{
  "availability" : [
    "DriverKit: -",
    "iOS: -",
    "iPadOS: -",
    "macOS: -"
  ],
  "documentType" : "symbol",
  "framework" : "DriverKit",
  "identifier" : "/documentation/DriverKit/OSSerialization/finalizeBuffer",
  "metadataVersion" : "0.1.0",
  "role" : "Instance Method",
  "symbol" : {
    "kind" : "Instance Method",
    "modules" : [
      "DriverKit"
    ],
    "preciseIdentifier" : "c:@S@OSSerialization@F@finalizeBuffer#*l#"
  },
  "title" : "finalizeBuffer"
}
-->

# finalizeBuffer

Obtain the result of the serialization performed by createFromObject().

```
const void * finalizeBuffer(size_t *length);
```

## Parameters

`length`

The length of the serialization data.

## Return Value

NULL on failure, otherwise a pointer to the serialization data. It is valid only while the OSSerialization object is retained.

## Discussion

Obtain the result of the serialization performed by createFromObject().

---

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)