{"action":"created","issue":{"url":"https://api.github.com/repos/ktorio/ktor/issues/593","repository_url":"https://api.github.com/repos/ktorio/ktor","labels_url":"https://api.github.com/repos/ktorio/ktor/issues/593/labels{/name}","comments_url":"https://api.github.com/repos/ktorio/ktor/issues/593/comments","events_url":"https://api.github.com/repos/ktorio/ktor/issues/593/events","html_url":"https://github.com/ktorio/ktor/issues/593","id":361979791,"node_id":"MDU6SXNzdWUzNjE5Nzk3OTE=","number":593,"title":"http client (native macos_x64) v0.9.5-rc13 Memory leaks found","user":{"login":"luca992","id":4157455,"node_id":"MDQ6VXNlcjQxNTc0NTU=","avatar_url":"https://avatars1.githubusercontent.com/u/4157455?v=4","gravatar_id":"","url":"https://api.github.com/users/luca992","html_url":"https://github.com/luca992","followers_url":"https://api.github.com/users/luca992/followers","following_url":"https://api.github.com/users/luca992/following{/other_user}","gists_url":"https://api.github.com/users/luca992/gists{/gist_id}","starred_url":"https://api.github.com/users/luca992/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/luca992/subscriptions","organizations_url":"https://api.github.com/users/luca992/orgs","repos_url":"https://api.github.com/users/luca992/repos","events_url":"https://api.github.com/users/luca992/events{/privacy}","received_events_url":"https://api.github.com/users/luca992/received_events","type":"User","site_admin":false},"labels":[{"id":243686453,"node_id":"MDU6TGFiZWwyNDM2ODY0NTM=","url":"https://api.github.com/repos/ktorio/ktor/labels/bug","name":"bug","color":"fc2929","default":true}],"state":"open","locked":false,"assignee":{"login":"e5l","id":4290035,"node_id":"MDQ6VXNlcjQyOTAwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/4290035?v=4","gravatar_id":"","url":"https://api.github.com/users/e5l","html_url":"https://github.com/e5l","followers_url":"https://api.github.com/users/e5l/followers","following_url":"https://api.github.com/users/e5l/following{/other_user}","gists_url":"https://api.github.com/users/e5l/gists{/gist_id}","starred_url":"https://api.github.com/users/e5l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e5l/subscriptions","organizations_url":"https://api.github.com/users/e5l/orgs","repos_url":"https://api.github.com/users/e5l/repos","events_url":"https://api.github.com/users/e5l/events{/privacy}","received_events_url":"https://api.github.com/users/e5l/received_events","type":"User","site_admin":false},"assignees":[{"login":"e5l","id":4290035,"node_id":"MDQ6VXNlcjQyOTAwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/4290035?v=4","gravatar_id":"","url":"https://api.github.com/users/e5l","html_url":"https://github.com/e5l","followers_url":"https://api.github.com/users/e5l/followers","following_url":"https://api.github.com/users/e5l/following{/other_user}","gists_url":"https://api.github.com/users/e5l/gists{/gist_id}","starred_url":"https://api.github.com/users/e5l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e5l/subscriptions","organizations_url":"https://api.github.com/users/e5l/orgs","repos_url":"https://api.github.com/users/e5l/repos","events_url":"https://api.github.com/users/e5l/events{/privacy}","received_events_url":"https://api.github.com/users/e5l/received_events","type":"User","site_admin":false}],"milestone":null,"comments":1,"created_at":"2018-09-20T01:01:24Z","updated_at":"2018-11-12T08:58:01Z","closed_at":null,"author_association":"NONE","body":"Whenever I try and do a simple http request on macOs the program freezes and reports a memory leak:\r\n\r\nan example where I publish the latest eap13 branch commit to localMaven which is tagged (v0.9.5-rc13):\r\n\r\n    buildscript {\r\n        repositories {\r\n            jcenter()\r\n            maven { url 'https://plugins.gradle.org/m2/' }\r\n            maven { url 'https://dl.bintray.com/jetbrains/kotlin-native-dependencies' }\r\n            maven {url 'http://dl.bintray.com/kotlin/kotlin-dev'}\r\n        }\r\n        dependencies {\r\n            classpath \"org.jetbrains.kotlin:kotlin-native-gradle-plugin:0.9.2-dev-4008\"\r\n        }\r\n    }\r\n    \r\n    allprojects {\r\n    \r\n        project.ext {\r\n            //make extras set inside buildscript available in all modules\r\n            kotlin_version = '1.3.0-rc-51'\r\n            kotlin_coroutines_version = '0.26.1-eap13'\r\n        }\r\n    }\r\n    \r\n    \r\n    apply plugin: 'kotlin-platform-native'\r\n    \r\n    repositories {\r\n        mavenLocal()\r\n        jcenter()\r\n    }\r\n    \r\n    \r\n    \r\n    components.main {\r\n        targets = [\"macos_x64\"]\r\n        outputKinds = [EXECUTABLE]\r\n        dependencies {\r\n            implementation(\"org.jetbrains.kotlinx:kotlinx-coroutines-core-native:0.26.1-eap13\")\r\n    \r\n    \r\n            //you need to clone ktor and publish to local maven\r\n            implementation \"io.ktor:ktor-client-ios:0.9.4-SNAPSHOT\"\r\n        }\r\n    \r\n    }\r\n\r\n\r\nexample program:\r\n\r\n\r\n    import kotlinx.coroutines.runBlocking\r\n    import io.ktor.client.engine.ios.*\r\n    import io.ktor.client.*\r\n    import io.ktor.http.*\r\n    import io.ktor.client.request.*\r\n    import kotlinx.coroutines.*\r\n    import kotlin.coroutines.*\r\n    import platform.darwin.*\r\n    \r\n    \r\n    \r\n    \r\n    internal val ApplicationDispatcher: CoroutineDispatcher = NsQueueDispatcher(dispatch_get_main_queue())\r\n    \r\n    fun main(args: Array<String>) = runBlocking<Unit> {\r\n        val api = ApplicationApi()\r\n        api.about {\r\n            println(it)\r\n        }\r\n        delay(3000L)\r\n    \r\n        return@runBlocking\r\n    }\r\n    \r\n    internal class NsQueueDispatcher(\r\n            private val dispatchQueue: dispatch_queue_t\r\n    ) : CoroutineDispatcher() {\r\n        override fun dispatch(context: CoroutineContext, block: Runnable) {\r\n            dispatch_async(dispatchQueue) {\r\n                block.run()\r\n            }\r\n        }\r\n    }\r\n    \r\n    class ApplicationApi {\r\n        private val client = HttpClient()\r\n    \r\n        fun about(callback: (String) -> Unit) {\r\n            launch(ApplicationDispatcher) {\r\n                val result: String = client.get {\r\n                    url {\r\n                        protocol = URLProtocol.HTTPS\r\n                        port = 443\r\n                        host = \"tools.ietf.org\"\r\n                        encodedPath = \"rfc/rfc1866.txt\"\r\n                    }\r\n                }\r\n    \r\n                callback(result)\r\n            }\r\n        }\r\n    }\r\n    \r\n\r\nwhen run:\r\n\r\n    /opt/teamcity-agent/work/4d622a065c544371/runtime/src/main/cpp/Memory.cpp:1124: runtime \r\n    assert: Memory leaks found\r\n    Abort trap: 6\r\n\r\n    \r\n"},"comment":{"url":"https://api.github.com/repos/ktorio/ktor/issues/comments/437803821","html_url":"https://github.com/ktorio/ktor/issues/593#issuecomment-437803821","issue_url":"https://api.github.com/repos/ktorio/ktor/issues/593","id":437803821,"node_id":"MDEyOklzc3VlQ29tbWVudDQzNzgwMzgyMQ==","user":{"login":"e5l","id":4290035,"node_id":"MDQ6VXNlcjQyOTAwMzU=","avatar_url":"https://avatars1.githubusercontent.com/u/4290035?v=4","gravatar_id":"","url":"https://api.github.com/users/e5l","html_url":"https://github.com/e5l","followers_url":"https://api.github.com/users/e5l/followers","following_url":"https://api.github.com/users/e5l/following{/other_user}","gists_url":"https://api.github.com/users/e5l/gists{/gist_id}","starred_url":"https://api.github.com/users/e5l/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/e5l/subscriptions","organizations_url":"https://api.github.com/users/e5l/orgs","repos_url":"https://api.github.com/users/e5l/repos","events_url":"https://api.github.com/users/e5l/events{/privacy}","received_events_url":"https://api.github.com/users/e5l/received_events","type":"User","site_admin":false},"created_at":"2018-11-12T08:58:01Z","updated_at":"2018-11-12T08:58:01Z","author_association":"CONTRIBUTOR","body":"Still in progress. I'll ping in the issue when resolve."}}
{"actor":{"display_login":"e5l"}}