I implemented an XML parser on KMM and I'm calling...
# kotlin-native
l
I implemented an XML parser on KMM and I'm calling it from iOS at the press of a button. But when the function ends its scope, I'm not seeing a reduction in memory usage. What am I missing?
Copy code
class ViewController: UIViewController {

    @IBAction func importDatabase(_ sender: UIButton) {
        let xmlImporter = AirportXMLImporter(airportDatabaseService: DatabaseService())

        (1...5).forEach{ index in
            xmlImporter.parseXmlFile(path: Bundle.main.path(forResource: "airports-mundial", ofType: "xml")!)
                .subscribe(isThreadLocal: false,
                           onError: {error in},
                           onSuccess: {result in }).dispose()

        }
    }

    override func viewDidLoad() {
        super.viewDidLoad()
    }

}
The XML parser is the AirportXMLImporter. DatabaseService is injected as a persistence layer. DatabaseService is implemented in Swift.
Memory profile
239 Views