Fixed some wrapper lifetime and leak issues found in PlayDate bindings target.

This commit is contained in:
2026-07-25 10:28:24 +02:00
parent 06bd50ea83
commit 1d9504c225
6 changed files with 55 additions and 19 deletions
+6
View File
@@ -116,6 +116,9 @@ extension JSON {
}
}
guard ok else {
// A completed root container may already have been written to
// outval before the failure; consume it so its box is not leaked.
_ = convert(outval)
throw decodeError(context)
}
return convert(outval)
@@ -145,6 +148,9 @@ extension JSON {
}
}
guard ok else {
// A completed root container may already have been written to
// outval before the failure; consume it so its box is not leaked.
_ = convert(outval)
throw decodeError(context)
}
return convert(outval)