Bugzilla – Attachment 810549 Details for
Bug 1141444
clementine: a memory hog
Home
|
New
|
Browse
|
Search
|
[?]
|
Reports
|
Requests
|
Forgot Password
[patch]
delete the allocated mem v3
delete.patch (text/plain), 2.54 KB, created by
Jiri Slaby
on 2019-07-16 09:09:05 UTC
(
hide
)
Description:
delete the allocated mem v3
Filename:
MIME Type:
Creator:
Jiri Slaby
Created:
2019-07-16 09:09:05 UTC
Size:
2.54 KB
patch
obsolete
>--- > ext/libclementine-tagreader/tagreader.cpp | 6 ++++++ > ext/libclementine-tagreader/tagreader.h | 1 + > src/core/database.cpp | 5 ++++- > src/songinfo/ultimatelyricsprovider.cpp | 5 +++++ > src/songinfo/ultimatelyricsprovider.h | 1 + > 5 files changed, 17 insertions(+), 1 deletion(-) > >--- a/ext/libclementine-tagreader/tagreader.cpp >+++ b/ext/libclementine-tagreader/tagreader.cpp >@@ -125,6 +125,12 @@ TagReader::TagReader() > network_(new QNetworkAccessManager), > kEmbeddedCover("(embedded)") {} > >+TagReader::~TagReader() >+{ >+ delete factory_; >+ delete network_; >+} >+ > void TagReader::ReadFile(const QString& filename, > pb::tagreader::SongMetadata* song) const { > const QByteArray url(QUrl::fromLocalFile(filename).toEncoded()); >--- a/ext/libclementine-tagreader/tagreader.h >+++ b/ext/libclementine-tagreader/tagreader.h >@@ -50,6 +50,7 @@ class FileRefFactory; > class TagReader { > public: > TagReader(); >+ ~TagReader(); > > void ReadFile(const QString& filename, > pb::tagreader::SongMetadata* song) const; >--- a/src/core/database.cpp >+++ b/src/core/database.cpp >@@ -670,10 +670,12 @@ void Database::BackupFile(const QString& > sqlite3* source_connection = nullptr; > sqlite3* dest_connection = nullptr; > >- BOOST_SCOPE_EXIT((source_connection)(dest_connection)(task_id)(app_)) { >+ BOOST_SCOPE_EXIT((&source_connection)(&dest_connection)(task_id)(app_)) { > // Harmless to call sqlite3_close() with a nullptr pointer. > sqlite3_close(source_connection); > sqlite3_close(dest_connection); >+ qLog(Debug) << "Closed databases after backup" << source_connection << >+ dest_connection; > app_->task_manager()->SetTaskFinished(task_id); > } > BOOST_SCOPE_EXIT_END >@@ -709,4 +711,5 @@ void Database::BackupFile(const QString& > } > > sqlite3_backup_finish(backup); >+ qLog(Debug) << "Database backup finished"; > } >--- a/src/songinfo/ultimatelyricsprovider.cpp >+++ b/src/songinfo/ultimatelyricsprovider.cpp >@@ -34,6 +34,11 @@ UltimateLyricsProvider::UltimateLyricsPr > redirect_count_(0), > url_hop_(false) {} > >+UltimateLyricsProvider::~UltimateLyricsProvider() >+{ >+ delete network_; >+} >+ > void UltimateLyricsProvider::FetchInfo(int id, const Song& metadata) { > // Get the text codec > const QTextCodec* codec = >--- a/src/songinfo/ultimatelyricsprovider.h >+++ b/src/songinfo/ultimatelyricsprovider.h >@@ -33,6 +33,7 @@ class UltimateLyricsProvider : public So > > public: > UltimateLyricsProvider(); >+ ~UltimateLyricsProvider(); > > static const int kRedirectLimit; >
You cannot view the attachment while viewing its details because your browser does not support IFRAMEs.
View the attachment on a separate page
.
Actions:
View
|
Diff
Attachments on
bug 1141444
:
810426
|
810435
|
810464
|
810465
|
810466
|
810549
|
811247
|
811251