Fix for leaked NetworkAdapter refs in Java bindings