-
Notifications
You must be signed in to change notification settings - Fork 60
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
Vector elements should be freed using myvector.erase() #643
Comments
|
Hi sassy-asjp, |
basilisk/src/simulation/environment/eclipse/eclipse.cpp
Line 35 in ddd3571
Hi, according to documentation here, vector's erase() function should be used to remove an item from the vector and subsequently destroy it. We've run into problems where the vector still tracked a previously freed item and then tried to free it again, causing a segfault.
Also, this applies to all modules (I just included the above as an example case), and we implemented our fix like this:
this->eclipseOutMsgs.erase(this->eclipseOutMsgs.begin()+c);
The text was updated successfully, but these errors were encountered: