migueldeicaza / SwiftGodot

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

Variant.call leaks #544

Closed elijah-semyonov closed 2 months ago

elijah-semyonov commented 2 months ago

Repro:

let string = "Hello, World!"
let variant = Variant(string)

// https://docs.godotengine.org/en/stable/classes/class_string.html#class-string-method-left
let methodName = StringName("left")

for _ in 0 ..< 2000 {
    let _ = variant.call(method: methodName, Variant(2))
}