Xavier Del Campo Romero
6d7088adf5
SDTrack was taking the ownership for track, a pointer to tTrack allocated many layers above SDScenery::LoadScene. More specifically, it is allocated by either TrackBuildEx or TrackBuildv1, and both would allocate the tTrack instance via calloc(3) instead of C++'s new. Attempting to `delete` a pointer *not* allocated by a previous call to `new` is undefined behaviour according to the C++ standard. [1] In fact, SDScenery::LoadScene did not even attempt to modify the tTrack instance, so there was no need to take its ownership in the first place. [1]: https://en.cppreference.com/w/cpp/language/delete |
||
---|---|---|
.. | ||
drivers | ||
interfaces | ||
libs | ||
main | ||
modules | ||
tools | ||
CMakeLists.txt |