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

mpGLCanvas.cpp:481: mismatched new and delete ? #122

Closed
dcb314 opened this issue May 13, 2021 · 1 comment
Closed

mpGLCanvas.cpp:481: mismatched new and delete ? #122

dcb314 opened this issue May 13, 2021 · 1 comment
Assignees
Labels
Milestone

Comments

@dcb314
Copy link

dcb314 commented May 13, 2021

I just tried to compile the package with clang. It said:

mpGLCanvas.cpp:481:19: warning: 'void operator delete ' called on pointer returned from a mismatched allocation function [-Wmismatched-new-delete]

Source code is

    pixels = (GLbyte *)malloc(canvasWidth * canvasHeight * 3 * sizeof(GLbyte));

   delete [] pixels;
@brettbode brettbode self-assigned this Jul 25, 2021
@brettbode brettbode added the bug label Jul 25, 2021
@brettbode brettbode added this to the v-Next milestone Jul 25, 2021
@brettbode
Copy link
Owner

Hello,
Thanks for flagging the bug. I have checked in a change that uses new instead of the malloc which should correct the bug.

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

No branches or pull requests

2 participants