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

ncGroup.cpp:107: bad delete ? #98

Open
dcb314 opened this issue Sep 17, 2020 · 0 comments
Open

ncGroup.cpp:107: bad delete ? #98

dcb314 opened this issue Sep 17, 2020 · 0 comments

Comments

@dcb314
Copy link

dcb314 commented Sep 17, 2020

../../cxx4/ncGroup.cpp:107:5: warning: 'delete' applied to a pointer that was allocated with 'new[]'; did you mean 'delete[]'? [-Wmismatched-new-delete]
delete charName;
^
[]
../../cxx4/ncGroup.cpp:104:21: note: allocated with 'new[]' here
char* charName= new char[lenp+1];
^

twsearle added a commit to twsearle/netcdf-cxx4 that referenced this issue Nov 26, 2021
Use `delete[]` rather `delete` for deleting heap allocated char array.
WardF added a commit that referenced this issue Nov 29, 2021
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

1 participant