brettbode / wxmacmolplt

wxMacMolPlt is a graphical user interface principally for the GAMESS program
https://brettbode.github.io/wxmacmolplt/
Other
29 stars 9 forks source link

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

Closed dcb314 closed 3 years ago

dcb314 commented 3 years ago

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 commented 3 years ago

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