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
object TestClient {
@JvmStatic
funmain(args:Array<String>) {
runBlocking {
val ktorClient =HttpClient(CIO) {
install(WebSockets)
}
val client = ktorClient.rpc {
url {
host ="0.0.0.0"
port =1337
encodedPath ="/test"
}
rpcConfig {
serialization {
json()
}
}
}
val service = client.withService<TestService>()
var i =0while (true) {
val response = service.test(Args("Name #${i++}"))
println(response)
delay(1)
}
}
}
}
Expected behavior
No memory leaks
Additional context
Inspected with VisualVM, even after the GC Args and Response objects stay in the memory and the process eventually throws OutOfMemory
The text was updated successfully, but these errors were encountered:
Hey, @ponktacology ! I tried reproducing the leak scenario, but was not able to do so, checked as well with the visual VM.
Can you, please, provide a git repo and exact steps to reproduce it?
Describe the bug
The RPC services are leaking memory. In the example below the
Args
andResponse
objects are never cleared by the GC.To Reproduce
Steps to reproduce the behavior:
Example code:
Expected behavior
No memory leaks
Additional context
Inspected with VisualVM, even after the GC
Args
andResponse
objects stay in the memory and the process eventually throws OutOfMemoryThe text was updated successfully, but these errors were encountered: