Author: mladen.turk(a)jboss.com
Date: 2007-10-03 03:03:41 -0400 (Wed, 03 Oct 2007)
New Revision: 1076
Modified:
trunk/sight/native/share/dir.c
trunk/sight/test/org/jboss/sight/DirectoryTest.java
trunk/sight/test/org/jboss/sight/MemoryLeakTest.java
Log:
Fix Directory JNI call reference counter
Modified: trunk/sight/native/share/dir.c
===================================================================
--- trunk/sight/native/share/dir.c 2007-10-03 06:32:40 UTC (rev 1075)
+++ trunk/sight/native/share/dir.c 2007-10-03 07:03:41 UTC (rev 1076)
@@ -284,7 +284,7 @@
SIGHT_GLOBAL_TRY {
rv = apr_dir_remove(J2S(name), NULL);
- }
+ } SIGHT_GLOBAL_END();
SIGHT_FREE_CSTRING(name);
return rv;
}
Modified: trunk/sight/test/org/jboss/sight/DirectoryTest.java
===================================================================
--- trunk/sight/test/org/jboss/sight/DirectoryTest.java 2007-10-03 06:32:40 UTC (rev
1075)
+++ trunk/sight/test/org/jboss/sight/DirectoryTest.java 2007-10-03 07:03:41 UTC (rev
1076)
@@ -43,7 +43,7 @@
protected void setUp()
throws Exception
{
- Library.initialize(null);
+ Library.initialize("");
}
protected void tearDown()
Modified: trunk/sight/test/org/jboss/sight/MemoryLeakTest.java
===================================================================
--- trunk/sight/test/org/jboss/sight/MemoryLeakTest.java 2007-10-03 06:32:40 UTC (rev
1075)
+++ trunk/sight/test/org/jboss/sight/MemoryLeakTest.java 2007-10-03 07:03:41 UTC (rev
1076)
@@ -63,7 +63,7 @@
protected void setUp()
throws Exception
{
- Library.initialize(null);
+ Library.initialize("");
}
protected void tearDown()
@@ -76,7 +76,7 @@
throws Exception
{
- for (int i = 0; i < 1000000; i++) {
+ for (int i = 0; i < 100000; i++) {
new NativeObjectTestClass();
}
// Library.clear() will force that all native objects
Show replies by date