MCPcopy Create free account
hub / github.com/audacity/audacity / Clear

Method Clear

libraries/lib-track/Track.cpp:608–622  ·  view source on GitHub ↗

Source from the content-addressed store, hash-verified

606}
607
608void 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
625Track *TrackList::GetNext(Track &t, bool linked) const

Callers 3

ClearPendingTracksMethod · 0.45
Track.cppFile · 0.45
RestoreUndoRedoStateMethod · 0.45

Calls 2

SetOwnerMethod · 0.80
swapMethod · 0.45

Tested by

no test coverage detected