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

# copyObject

Obtain the result of the deserialization performed by createFromBytes().

```
OSObjectPtr copyObject();
```

## Return Value

NULL on failure, otherwise the allocated OSObject with reference count 1 to be released by the caller.

## Discussion

Obtain the result of the deserialization performed by createFromBytes().

---

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)