ChenLittlePing/LearningVideo

delete synthesizer这是个语法错误吗?

Gaomaxxr opened this issue · 1 comments

    
    JNIEXPORT void JNICALL

    Java_com_cxp_learningvideo_FFEncodeActivity_releaseEncoder(JNIEnv *env, jobject thiz, jint synthesizer) {

        Synthesizer *s =  (Synthesizer *)synthesizer;

        delete synthesizer;
     }

源native-lib.cpp中这里delete synthesizer这一行报错:

...\LearningVideo-master\app\src\main\cpp\native-lib.cpp:137:9: error: cannot delete expression of type 'jint' (aka 'int')

这里我运行是有问题的,我c/c++不是很懂,ndk小白,能请教一下吗,谢谢

这明显是变量名写错了,上面定义的Synthesizer *s,下面应该是delete s;