We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
There was an error while loading. Please reload this page.
1 parent f83a91e commit 9df6998Copy full SHA for 9df6998
Sources/JavaScript/JSValue.swift
@@ -42,6 +42,7 @@ public class JSValue {
42
self.context = context
43
let bytes = [UInt16](string.utf16)
44
let stringRef = JSStringCreateWithCharacters(bytes, bytes.count)
45
+ defer { JSStringRelease(stringRef) }
46
self.pointer = JSValueMakeString(context, stringRef)
47
}
48
0 commit comments