Fixed various memory leaks as reported by AddressSanitizer

This commit is contained in:
Alberto Griggio
2017-06-07 10:36:28 +02:00
parent b3956a3fda
commit 2edd677d1a
10 changed files with 78 additions and 50 deletions

View File

@@ -53,12 +53,6 @@ public:
}
};
struct FileBrowserIdleHelper {
FileBrowser* fbrowser;
bool destroyed;
int pending;
};
/*
* Class handling actions common to all thumbnails of the file browser
*/
@@ -71,6 +65,7 @@ private:
typedef sigc::signal<void> type_trash_changed;
IdleRegister idle_register;
unsigned int session_id_;
protected:
Gtk::MenuItem* rank[6];
@@ -129,7 +124,6 @@ protected:
FileBrowserListener* tbl;
BrowserFilter filter;
int numFiltered;
FileBrowserIdleHelper* fbih;
void toTrashRequested (std::vector<FileBrowserEntry*> tbe);
void fromTrashRequested (std::vector<FileBrowserEntry*> tbe);
@@ -152,6 +146,8 @@ public:
FileBrowserEntry* delEntry (const Glib::ustring& fname); // return the entry if found here return NULL otherwise
void close ();
unsigned int session_id() const { return session_id_; }
void setBatchPParamsChangeListener (BatchPParamsChangeListener* l)
{
bppcl = l;