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

Fixed dynamic array mismatch new[] & delete -> delete[] #6

Merged
merged 1 commit into from
Apr 23, 2019

Conversation

ashley-b
Copy link
Contributor

Dynamic arrays are not freed with matching delete e.g

m_MicInMagdB = new float[F_MAG_N];

delete m_MicInMagdB;

Should be eg

  SomeType xxxx = new SomeType[];
  delete[] xxxx;

But I would suggest using std::vector to take care of memory allocation and cleanup

@drowe67
Copy link
Owner

drowe67 commented Apr 20, 2019

Thanks @ashley-b

I'e just merged some Travis integration with master. Could you pls test your PR against that?

@ashley-b ashley-b force-pushed the bug_unmatched_array_new_delete branch from e4a2d3e to 0c2bf98 Compare April 23, 2019 12:25
@ashley-b
Copy link
Contributor Author

I have move the bugfix branch up to your current master and test it works for me. Hopeful you see the branch at its new location .

@drowe67
Copy link
Owner

drowe67 commented Apr 23, 2019

Thanks @ashley-b

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

Successfully merging this pull request may close these issues.

2 participants