-
Notifications
You must be signed in to change notification settings - Fork 86
Open
scala/scala
#10783Description
Hi,
when you run code
object Main {
implicit val syncExecutor : ExecutionContext = new ExecutionContext {
override def execute(runnable: Runnable): Unit = runnable.run()
override def reportFailure(cause: Throwable): Unit = throw cause
}
def stop : Unit = {
Thread.sleep(60000)
println("stop")
}
class Witness
def main(args: Array[String]): Unit = {
async{
await(Future{new Witness})
stop
}
}
}and then, during the sleep, you take a heap dump with VisualVM, you see that there is still an object of type Witness in the heap. Is this normal?
Reactions are currently unavailable
Metadata
Metadata
Assignees
Labels
No labels