I have a shared_ptr to some image buffer in my c++ code that I would like to share with some other c++ objects as well as Java classes through JNI. I was wondering what is the best way to do so ?
how can I ensure that my java class have access to the buffer allocated on the heap. My concern is to avoid memory leak and also ensure that buffer doesn't get destroyed too soon before getting processed by the java class (
Aucun commentaire:
Enregistrer un commentaire