Hi MicroEJ,
I have a question about managing native resources.
I don’t understand the purpose of the following native function:
/**
* Gets the ID of the native close function.
*
* @return the ID of the static native close function
* @throws NativeException
* on error
*/
int32_t LLSEC_SECRET_KEY_IMPL_nativeGetCloseId(void);
The return value appears to be the identifier of a function used to close a native resource created by LLSEC_SECRET_KEY_IMPL_create.
However, it is essential in LLSEC_SECRET_KEY_IMPL_create to use SNI_registerResource, which seems to serve the same purpose as LLSEC_SECRET_KEY_IMPL_nativeGetCloseId. At the risk of getting an IllegalArgumentException.
So I wonder, what is the purpose of the native LLSEC_SECRET_KEY_IMPL_nativeGetCloseId if we are required to call SNI_registerResource in the native creation function
Thanks!
S.