samedi 27 août 2016

How to dynamically allocate memory for JNI object array

I am working on JNI with C language. Here I have created an object array of size 4000. According to my requirements the array size has to grow dynamically. How can I allocate memory dynamically? I have tried using malloc. But I cannot achieve this.

Here's what I have tried:

OriginalArray = (*env)->NewObjectArray(env, 4000, tradeObject, NULL);

Aucun commentaire:

Enregistrer un commentaire