migueldeicaza / SwiftGodot

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

VariantCollection memory leak #417

Closed jbromberg closed 5 months ago

jbromberg commented 5 months ago

There seems to be a memory leak every time a VariantCollection is created. I've tested this with various other properties that return a VariantCollection and the issue is there for all of them. The function below showcases the problem in a rather extreme way.

    func memoryLeak() {
        let node = Node3D()

        for _ in 0...10000 {
            node.getPropertyList()
        }
    }
migueldeicaza commented 5 months ago

This is fixed, can you take it for a spin?