This enhancement implements the IDisposable pattern for the ZooKeeper handle.
This is useful for scenarios where a newly created handle is to be used transiently, and consequently should not have its connection persist beyond that use.
With this change, the handle can now be used transiently like so:
public async Task InteractWithZooKeeper()
{
using var zooKeeperHandle = new ZooKeeper(...);
var dataResult = await zooKeeperHandle.getDataAsync("/");
Console.WriteLine("Got data!");
}
This enhancement implements the IDisposable pattern for the ZooKeeper handle. This is useful for scenarios where a newly created handle is to be used transiently, and consequently should not have its connection persist beyond that use. With this change, the handle can now be used transiently like so: