Fixing mem leak in NettyRemoteSupport.unregister

This commit is contained in:
Viktor Klang 2011-06-17 12:04:17 +02:00
parent d2c80a4b54
commit 0b1174fff9

View file

@ -702,7 +702,7 @@ trait NettyRemoteServerModule extends RemoteServerModule { self: RemoteModule
def unregister(actorRef: ActorRef): Unit = guard withGuard {
if (_isRunning.isOn) {
actors.remove(actorRef.address, actorRef)
actorsByUuid.remove(actorRef.uuid, actorRef)
actorsByUuid.remove(actorRef.uuid.toString, actorRef)
}
}
@ -716,7 +716,7 @@ trait NettyRemoteServerModule extends RemoteServerModule { self: RemoteModule
if (id.startsWith(UUID_PREFIX)) actorsByUuid.remove(id.substring(UUID_PREFIX.length))
else {
val actorRef = actors get id
actorsByUuid.remove(actorRef.uuid, actorRef)
actorsByUuid.remove(actorRef.uuid.toString, actorRef)
actors.remove(id, actorRef)
}
}