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
// a toml stringvartomlString= '''
port =6789
socks_port =7890
allow_lan = false
bind_address = '*'
log_level = 'debug'
ipv6 = false
tun_fd =0
'''
// `NetspeedConfig` is a Swift Struct define in my appvarconfig=tryTOMLDecoder().decode(NetspeedConfig.self, from: tomlString)// set property etc.
config.tun_fd =10...// convert to toml string
tomlString =tryTOMLEncoder().encode(config)// create a TOMLKit tablelettable=tryTOMLTable(string: tomlString)// convert to stringsletoutput_toml= table.convert(to:.toml)letoutput_json= table.convert(to:.json)letoutput_yaml= table.convert(to:.yaml)
My Code is quit simple:
Xcode Instruments catch this memory leak, please download it and check in Xcode
https://github.com/codingiran/TOMLKit/blob/main/MemoryLeaks/TOMlKit%20Memory%20Leaks.trace.zip
The text was updated successfully, but these errors were encountered: