esmini
esmini copied to clipboard
elevation wrong
OSI cannot handle this xodr. The elevation chages in a line.
ElevationChangeIn50MLine.zip
wrong shape
Basically OK, but there are a few small flaws. It's not important But repeatedly load many memory leaks lane and LaneSection
Or, for example
No release
class lane and class LaneSection
Thanks for fixing the bug, but there are some places that haven't been fixed
Thanks for testing - good finding that additional bug!
Committed fixes included in release v2.26.6.
Regarding memory leakage. I fixed the first one. We'll not have time to do more right now due to other prioritizations. But anyone that finds and can fix glitches are welcome to do a pull request. I like that approach since the cred (commit owner) goes to the finder 👍.
Destructor releases memory completely Road::~Road() { for (size_t i = 0; i < geometry_.size(); i++) { delete(geometry_[i]); } geometry_.clear(); for (size_t i = 0; i < elevation_profile_.size(); i++) { delete(elevation_profile_[i]); } elevation_profile_.clear(); for (size_t i = 0; i < super_elevation_profile_.size(); i++) { delete(super_elevation_profile_[i]); } super_elevation_profile_.clear(); for (size_t i = 0; i < super_elevation_shape_profile_.size(); i++) { delete(super_elevation_shape_profile_[i]); } super_elevation_shape_profile_.clear(); for (size_t i = 0; i < link_.size(); i++) { delete(link_[i]); } link_.clear(); for (size_t i = 0; i < lane_section_.size(); i++) { delete(lane_section_[i]); } lane_section_.clear(); for (size_t i = 0; i < lane_offset_.size(); i++) { delete(lane_offset_[i]); } lane_offset_.clear(); for (size_t i = 0; i < signal_.size(); i++) { delete(signal_[i]); } signal_.clear(); for (size_t i = 0; i < object_.size(); i++) { delete(object_[i]); } object_.clear(); } ~LaneSection() { for (size_t i = 0; i < lane_.size(); i++) { delete lane_[i]; } lane_.clear(); } ~Lane() { for (size_t i = 0; i < link_.size(); i++) { delete link_[i]; } link_.clear();
for (size_t i = 0; i < lane_width_.size(); i++)
{
delete lane_width_[i];
}
lane_width_.clear();
for (size_t i = 0; i < lane_height_.size(); i++)
{
delete lane_height_[i];
}
lane_height_.clear();
for (size_t i = 0; i < lane_roadMark_.size(); i++)
{
delete lane_roadMark_[i];
}
lane_roadMark_.clear();
delete lane_boundary_;
lane_boundary_ = 0;
}
Excellent, thanks for the code!
But instead of me committing it I really want to encourage you to file a pull request - so that the commit will be associated with your GitHub user.
Here's a guide how to do it: https://docs.github.com/en/pull-requests/collaborating-with-pull-requests/proposing-changes-to-your-work-with-pull-requests/creating-a-pull-request-from-a-fork
(you need write-access to the repo from which you do the pull request, that's why external esmini users need to do it from a fork that they own)
Of course, if you don't want to or don't have the time: Just let me know and I will copy the code and do the commit.
Thanks for the pull request (#336)! Closing this issue now since the issue is solved within this issue and some memory leaks solved by your pull request.