weiclin
weiclin

Reputation: 95

Is manually freeing resources of JNI method id required

I'm learning JNI and I found that jmethodID is actually a pointer.

Do I need to manually free the pointer that is returned by GetMethodID()?

Upvotes: 0

Views: 139

Answers (1)

Zaboj Campula
Zaboj Campula

Reputation: 3360

No, the pointer returned from GetMethodID() must not be manually freed.

UPDATE: JNI specification explicitly states when a function allocates something, what must be manually released. If a function does not allocate anything that must be freed then the specification usually does not contain such information explicitly written.

Upvotes: 1

Related Questions