Delete of a track in TGeo

If I understand correctly, after having initialized a track by TGeoManager::InitTrack(), one is not obliged to call TGeoManager::AddTrack() and store by that the track into the collection fTracks. One has to do so only if one wants to keep the track for drawing it later on.
So let us suppose that TGeoManager::AddTrack() has not been called and that tracking of this track is finished and one wants to generate the next track. How do one delete the previous track before generating the new? I do not see any method like TGeoManager::DeleteTrack() and the method TGeoManager::ClearTracks() only delete the tracks stored into the collection fTracks. How to avoid a memory leak?
Thanks for your help

No, the method InitTrack() does not create any TGeoTrack object - it just locates a point in the hierarchy and initializes the direction, so that a next call to FindNextBoundary() to be valid. Maybe a misleading name but historically this was implemented way before the support for tracks was introduced.
Anyway, no track is automatically created but is the user responsibility to add new tracks or remove them from the list of tracks (using TGeoManager API)

Regards,

Ok I understand. Thanks a lot!