NishantMungse wrote:C: Alloc something giving a pointer
The assumption here is that java code calls a C function from a
shared library in Linux.
How should memory management be done in the native code called
from Java using a JNI interface?
What role does the Garbage Collector play in handling memory thatIt doesn't.
was allocated in the native C code?
If I allocate memory using malloc() in the C program, should IYou must explicitly free it.
explicitly free it? Will the GC take care of it?
Does anyone have an idea of how memory management be done whileSee above.
implementing a JNI interface?