diff options
author | Uwe Klotz <uklotz@mixxx.org> | 2018-02-24 12:20:44 +0100 |
---|---|---|
committer | Uwe Klotz <uklotz@mixxx.org> | 2018-02-24 12:20:44 +0100 |
commit | 75c0ece8f77ed7d0a6d84b887db570a0ab87cfe9 (patch) | |
tree | e259a3211b02f806b25fad38ffb1c76bf382af34 /src/library/library.cpp | |
parent | 4abb74eb2893ee4b3c8162514ce39f207e2a83f4 (diff) |
Add comments about why we are using a plain pointer
Diffstat (limited to 'src/library/library.cpp')
-rw-r--r-- | src/library/library.cpp | 6 |
1 files changed, 6 insertions, 0 deletions
diff --git a/src/library/library.cpp b/src/library/library.cpp index 1a86ec22fa..c1b43d2322 100644 --- a/src/library/library.cpp +++ b/src/library/library.cpp @@ -435,6 +435,9 @@ void Library::saveCachedTrack(TrackPointer pTrack) noexcept { // ensure that we have exclusive (write) access on the file // and not reader or writer is accessing the same file // concurrently. + // Pass the track object via a plain pointer to prevent the + // creation of any new references from the shared pointer + // that will be deleted soon! m_pTrackCollection->exportTrackMetadata(pTrack.get()); // NOTE(uklotzde, 2018-02-20): @@ -464,5 +467,8 @@ void Library::saveCachedTrack(TrackPointer pTrack) noexcept { void Library::saveTrack(TrackPointer pTrack) { // Update the database + // Pass the track object via a plain pointer to prevent the + // creation of any new references from the shared pointer + // that will be deleted soon! m_pTrackCollection->saveTrack(pTrack.get()); } |