You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
We found that using XMLElement leaks memory under Linux. Here's a simple test program that just parses a document and prints the number of child elements, and running this under Linux, we can see the memory increase with each iteration:
import Foundation
letsample="""<?xml version="1.0" encoding="UTF-8"?><subscription><plan_code>monthly-test</plan_code><currency>USD</currency><account><account_code>241A52B6-CE23-4B6A-90B7-52710F3E6312</account_code><email>hello@test.nl</email><billing_info><token_id>O_zV7-8FNW6gYR0tXqrxjA</token_id></billing_info></account></subscription>"""letdata= sample.data(using:.utf8)!
for _ in 0..<10_000{
guard let x:XMLElement=tryXMLDocument(data: data, options:[]).rootElement()else{fatalError()}print(x.children!.count)}
The text was updated successfully, but these errors were encountered:
Additional Detail from JIRA
md5: c140418a6401f05f9397c5dd7cec846c
Issue Description:
We found that using XMLElement leaks memory under Linux. Here's a simple test program that just parses a document and prints the number of child elements, and running this under Linux, we can see the memory increase with each iteration:
The text was updated successfully, but these errors were encountered: