[MAT-407] Use unique_ptr to manage jint arrays