| 606 | } |
| 607 | |
| 608 | void TrackList::Clear(bool sendEvent) |
| 609 | { |
| 610 | // Null out the back-pointers to this in tracks, in case there |
| 611 | // are outstanding shared_ptrs to those tracks, making them outlive |
| 612 | // the temporary ListOfTracks below. |
| 613 | for (auto pTrack: Tracks<Track>()) { |
| 614 | pTrack->SetOwner({}, {}); |
| 615 | |
| 616 | if (sendEvent) |
| 617 | DeletionEvent(pTrack->shared_from_this(), false); |
| 618 | } |
| 619 | |
| 620 | ListOfTracks tempList; |
| 621 | tempList.swap( *this ); |
| 622 | } |
| 623 | |
| 624 | /// Return a track in the list that comes after Track t |
| 625 | Track *TrackList::GetNext(Track &t, bool linked) const |
no test coverage detected