delete global variable used local referance in jni