[libvirt] [PATCH Java] Cleanup close/free handling

2010-03-20 Thread Matthias Bolte
The Connect class itself can have one ref to the internal virConnectPtr. Therefore, it has to release the VCP in its close method always. Otherwise multiple calls may release more then one ref, resulting in a ref-underflow later on. Make StoragePool's and StorageVol's free return int, like all oth

[libvirt] [PATCH Java] Add finalize to automatically free libvirt objects

2010-03-20 Thread Matthias Bolte
The Connect and Network classes already had finalize, add it to all other classes that wrap libvirt objects to unify the behavior. --- src/main/java/org/libvirt/Device.java |5 + src/main/java/org/libvirt/Domain.java |5 + src/main/java/org/libvirt/Interface.java |5

[libvirt] [PATCH] tests: Don't add extra padding if counter mod 40 is 0

2010-03-20 Thread Matthias Bolte
--- tests/test-lib.sh | 10 ++ tests/testutils.c |2 +- 2 files changed, 7 insertions(+), 5 deletions(-) diff --git a/tests/test-lib.sh b/tests/test-lib.sh index 43265f3..57fd438 100644 --- a/tests/test-lib.sh +++ b/tests/test-lib.sh @@ -55,10 +55,12 @@ test_final() if test "$v