sliemeobn / ipp-nio

Internet Printing Protocol (IPP) implementation for Swift based on swift-nio.
https://swiftpackageindex.com/sliemeobn/ipp-nio/main/documentation
Apache License 2.0
9 stars 1 forks source link

Example will crash when running via Xcode #3

Open ronnybremer opened 1 month ago

ronnybremer commented 1 month ago

In the example code you are allocating a new HTTPClient here: https://github.com/sliemeobn/ipp-nio/blob/bad39b4b832b83bf9361e0f5ae7bfa1f9ea90ff8/Examples/PrintPDF/main.swift#L5

According to the docs of AsyncHttp, this will lead to a memory leak and if running the example app via Xcode it will be forcefully terminated due to this check: AsyncHttp::HTTPClient

I'll open a pull request.