Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

delete synthesizer这是个语法错误吗? #15

Open
Gaomaxxr opened this issue Oct 27, 2020 · 1 comment
Open

delete synthesizer这是个语法错误吗? #15

Gaomaxxr opened this issue Oct 27, 2020 · 1 comment

Comments

@Gaomaxxr
Copy link

    
    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小白,能请教一下吗,谢谢

@butterfly0Dream
Copy link

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

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

2 participants