migueldeicaza / SwiftGodot

New Godot bindings for Swift
https://migueldeicaza.github.io/SwiftGodotDocs/tutorials/swiftgodot-tutorials/
MIT License
1.19k stars 77 forks source link

String leak when wrapping in a Variant #541

Closed migueldeicaza closed 2 months ago

migueldeicaza commented 2 months ago

It looks like we have a string leak when wrapping in a variant:

image

Doing this:

Variant("foo")

Sample repro:

for _ in 0...1000000 {
    let string = Variant("foo")
}