"java -jar slave.jar" currently has a logic that keeps on reconnecting if a connection is dropped. This is good, but over a long run, if any memory leak happens during a connection, it'll slowly clog up the JVM.
On Unix, it is better to exec to itself to start clean in case of a connection loss. On slaves managed as a Windows service, it is better to just terminate the process and let Windows SCM launch a new one.
Slaves should do this kind of intelligent reconnection, much like how Jenkins master restarts itself.