Work at SourceForge, help us to make it a better place! We have an immediate need for a Support Technician in our San Francisco or Denver office.

Close

#8 Memory-Leak in JNative.invoke()

closed
Marc DENTY
Native side (6)
5
2007-05-07
2007-04-11
carsten kemper
No

Hi Marc,
I recognized an Memory leak in the JNative.invoke() method.
By using the JNative.invoke() method in different methods, calling different functions in the native dll, the memory increases continously by about 50KB to 80KB per call.
Sorry, but I have no example available, but try your "FreeSpaceAvailable"-Example, call it for more than one time and watch the memory usage increasing.

Nevertheless... Great work, great project!
Thanks!
Carsten

Discussion

  • Marc DENTY
    Marc DENTY
    2007-04-25

    Logged In: YES
    user_id=84736
    Originator: NO

    Need to have time to reproduce.

     
  • Marc DENTY
    Marc DENTY
    2007-04-25

    • assigned_to: nobody --> mdenty
     
  • Logged In: NO

    I have experienced the same problem.

    Look at line 290 in org_volks_jnative_JNative.cpp, function Java_org_xvolks_jnative_JNative_nInvoke

    cParameters[i] = (char*)env->GetByteArrayElements(jParameters[i], &b);

    This should be followed with a call to ReleaseByteArrayElements

     
  • Marc DENTY
    Marc DENTY
    2007-05-07

    • status: open --> closed
     
  • Marc DENTY
    Marc DENTY
    2007-05-07

    Logged In: YES
    user_id=84736
    Originator: NO

    This bug was fixed thanks to an anonymous post please see it at :
    http://sourceforge.net/forum/message.php?msg_id=4291288

    I have copied exactly the sugested fix.

    Best,

    --Marc