Open gbuela opened 7 years ago
@gbuela
Thanks for letting me know. However I can not reproduce it for now. I'd like to know more about leak situation.
Thanks
I realize this is an old issue at this point, but I am experiencing this as well with 5.2.7. It happens for me after calling htmlDocument.body?.removeChild(childElement)
.
It seems removeChild
doesn't fully cleanup the libxml2 memory. Possibly it should call xmlFreeNode
instead of xmlFree
?
@bfichter You're right. Thanks for the helpful advice!
Description:
I'm getting memory leaks here:
0 libsystem_malloc.dylib malloc_zone_malloc 1 libsystem_malloc.dylib malloc 2 libxml2.2.dylib xmlStrndup 3 libxml2.2.dylib xmlSplitQName 4 libxml2.2.dylib xmlSAX2StartElement 5 libxml2.2.dylib htmlParseStartTag 6 libxml2.2.dylib htmlParseContentInternal 7 libxml2.2.dylib htmlParseDocument 8 libxml2.2.dylib htmlDoRead 9 Kanna specialized libxmlXMLDocument.init(xml:url:encoding:option:) 10 Kanna specialized libxmlHTMLDocument.init(html:url:encoding:option:) 11 Kanna libxmlHTMLDocument.init(html:url:encoding:option:) /Users/.../Pods/Kanna/Sources/Kanna/Kanna.swift:0 12 Kanna libxmlHTMLDocument.__allocating_init(html:url:encoding:option:) /Users/.../Pods/Kanna/Sources/Kanna/Kanna.swift:0 13 Kanna HTML(html:encoding:option:) /Users/.../Pods/Kanna/Sources/Kanna/Kanna.swift:125
Installation method:
Library version:
Xcode version: