Solve the memory leak in the JNI methods of protocols.
Merge pull request #31 from natural-law/develop

Solve the memory leak in the JNI methods of protocols.