If you are using COM from JNI, beware of the threading model of the COM object. In-proc COM objects should be fine and simply creating and releasing COM object within your JNI call is fine.
However, if you are creating an out-of-proc COM object in one
thread and using it in another, you might run into problems.