From 0990d99fdb340f7c442b24c127485258c637d003 Mon Sep 17 00:00:00 2001 From: David Anderson Date: Thu, 6 Oct 2011 01:14:21 +0000 Subject: [PATCH] - client: free vectors in NOTICES, RSS_FEEDS, and DAILY_XFER_HISTORY in free_mem() (for mem leak checking) svn path=/trunk/boinc/; revision=24337 --- checkin_notes | 73 ++++++++++++++++++++++++------------------ client/check_state.cpp | 4 +++ client/cs_notice.h | 6 ++++ client/net_stats.h | 3 ++ 4 files changed, 54 insertions(+), 32 deletions(-) diff --git a/checkin_notes b/checkin_notes index 55eb12fb72..24e9b808c3 100644 --- a/checkin_notes +++ b/checkin_notes @@ -6381,22 +6381,22 @@ Rom 22 Sept 2011 vbox.cpp, .h David 22 Sept 2011 - - client: more work on replicated trickles. Not working yet. + - client: more work on replicated trickles. Not working yet. - client/ - client_state.cpp - cs_trickle.cpp,h + client/ + client_state.cpp + cs_trickle.cpp,h David 22 Sept 2011 - - client: replicated trickles. Seems to be working now. - - client: added config option + - client: replicated trickles. Seems to be working now. + - client: added config option - client/ - cs_trickle.cpp - gui_http.cpp,h - httl_curl.cpp - lib/ - cc_config.cpp,h + client/ + cs_trickle.cpp + gui_http.cpp,h + httl_curl.cpp + lib/ + cc_config.cpp,h Rom 22 Sept 2011 - Tag for 6.13.5 release, all platforms @@ -6507,15 +6507,15 @@ David 26 Sept 2011 cc_config.h David 26 Sept 2011 - - web: when showing a user's posts, don't show the ones - in hidden threads - - web: in showing the context of a post, link the thread also. + - web: when showing a user's posts, don't show the ones + in hidden threads + - web: in showing the context of a post, link the thread also. - html/ - user/ - forum_user_posts.php - inc/ - forum.inc + html/ + user/ + forum_user_posts.php + inc/ + forum.inc Charlie 27 Sep 2011 - client: Fix compile break on Mac. @@ -6670,13 +6670,13 @@ David 1 Oct 2011 client_state.cpp David 1 Oct 2011 - - team import script: don't exit if fail to create user. - The failure may be because the email is banned - (as happened w/ SETI@home) + - team import script: don't exit if fail to create user. + The failure may be because the email is banned + (as happened w/ SETI@home) - html/ops/ - team_import.php - + html/ops/ + team_import.php + David 2 Oct 2011 - client: fix bug that could cause GPU idleness in the presence of GPU exclusions. @@ -6774,10 +6774,10 @@ David 4 Oct 2011 client_types.cpp David 4 Oct 2011 - - client: win compile fixes + - client: win compile fixes - client/ - cpu_sched.cpp + client/ + cpu_sched.cpp Rom 4 Oct 2011 - WINSCR: Before shutting down the screensaver, quickly reinitialize the OpenGL device @@ -6810,10 +6810,10 @@ David 4 Oct 2011 handle_request.cpp David 5 Oct 2011 - - client: fix a memory leak; would lose ~120 bytes each time a job is started + - client: fix a memory leak; would lose ~120 bytes each time a job is started - lib/ - filesys.cpp + lib/ + filesys.cpp Rom 5 Oct 2011 - Lib: Re-enable boinc lib mem snapshots for BOINC based applications (boinc, @@ -6831,3 +6831,12 @@ David 5 Oct client/ app.h app_control.cpp + +David 5 Oct + - client: free vectors in NOTICES, RSS_FEEDS, and DAILY_XFER_HISTORY + in free_mem() (for mem leak checking) + + client + cs_notice.h + check_state.cpp + net_stats.h diff --git a/client/check_state.cpp b/client/check_state.cpp index d6888e49c0..25785a6452 100644 --- a/client/check_state.cpp +++ b/client/check_state.cpp @@ -240,4 +240,8 @@ void CLIENT_STATE::free_mem() { delete file_xfers; delete pers_file_xfers; delete scheduler_op; + + notices.clear(); + rss_feeds.clear(); + daily_xfer_history.clear(); } diff --git a/client/cs_notice.h b/client/cs_notice.h index 2b507fb41f..8f477ea6f4 100644 --- a/client/cs_notice.h +++ b/client/cs_notice.h @@ -78,6 +78,9 @@ struct NOTICES { void unkeep(const char* url); // called after parsing an RSS feed, // to remove notices that weren't in the feed. + void clear() { + notices.clear(); + } }; extern NOTICES notices; @@ -122,6 +125,9 @@ struct RSS_FEEDS { RSS_FEED* lookup_url(char*); void update_proj_am(PROJ_AM*); void write_feed_list(); + void clear() { + feeds.clear(); + } }; extern RSS_FEEDS rss_feeds; diff --git a/client/net_stats.h b/client/net_stats.h index e2f025bea7..23051c8070 100644 --- a/client/net_stats.h +++ b/client/net_stats.h @@ -140,6 +140,9 @@ struct DAILY_XFER_HISTORY { DAILY_XFER_HISTORY() { dirty = false; } + void clear() { + daily_xfers.clear(); + } }; extern NET_STATUS net_status;