Github user anmolnar commented on the issue:
https://github.com/apache/zookeeper/pull/611
@enixon I think it leaks the map anyway, because when the new Watcher is
added, new Watcher instance gets created which will be added to Map anyway and
the empty one remains forever.
@wangchaod Would you please consider adding a quick unit test for the
patch. Otherwise, it looks good.---
