<!--
{
  "availability" : [
    "iOS: 8.0.0 -",
    "iPadOS: 8.0.0 -",
    "macCatalyst: 13.1.0 -",
    "macOS: 10.10.0 -",
    "tvOS: 9.0.0 -",
    "visionOS: 1.0.0 -"
  ],
  "documentType" : "symbol",
  "framework" : "JavaScriptCore",
  "identifier" : "/documentation/JavaScriptCore/JSManagedValue/init(value:andOwner:)",
  "metadataVersion" : "0.1.0",
  "role" : "Initializer",
  "symbol" : {
    "kind" : "Initializer",
    "modules" : [
      "JavaScriptCore"
    ],
    "preciseIdentifier" : "c:objc(cs)JSManagedValue(cm)managedValueWithValue:andOwner:"
  },
  "title" : "init(value:andOwner:)"
}
-->

# init(value:andOwner:)

Creates a managed value and associates it with an owner.

```
init!(value: JSValue!, andOwner owner: Any!)
```

## Parameters

`value`

A JavaScript value.

`owner`

The Objective-C or Swift object responsible for

## Return Value

A new managed value.

## Discussion

Calling this method is equivalent to creating a managed value and then reporting it to the JavaScriptCore virtual machine using the [`addManagedReference(_:withOwner:)`](/documentation/JavaScriptCore/JSVirtualMachine/addManagedReference(_:withOwner:)) 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)