google-code-export / google-gadgets-for-linux

Automatically exported from code.google.com/p/google-gadgets-for-linux
0 stars 0 forks source link

Possible memory leaks? #84

Closed GoogleCodeExporter closed 9 years ago

GoogleCodeExporter commented 9 years ago
1. In curl_xml_http_request.cc:1074
  session->share_ref = curl_easy_init();
  but seems that curl_easy_cleanup() is never called against share_ref.

2. system_utils.cc:385
  DIR *pdir = opendir(dir_path.c_str());
  but dir is never closed.

3. view.cc:1063
      if (it->first->GetSrcElement()) { 
        FireEvent(it->first, *it->second);
        delete it->first->GetEvent();
        delete it->first;
      }
   if GetSrcElement() returns NULL, then it->first->GetEvent() and
it->first will leak.

4.

Original issue reported on code.google.com by james...@gmail.com on 17 May 2008 at 5:11

GoogleCodeExporter commented 9 years ago
Attached is valgrind log after fixing above 3 leaks.

But seemst that there are still memory leaks. I'm running following gadgets:
4 rss gadgets
2 calculator
1 flower pot
1 analog clock
1 performance meter
1 system info by links
1 date display
1 CALGOT MAIMAI和数字时钟
1 CALGOT 和MAIMAI圣诞树
1 weather globe
1 Hot! CPU Smiley.

without touching anything, the RSS grew from 54M to 66M in about 20 minutes.

Original comment by james...@gmail.com on 17 May 2008 at 8:19

Attachments:

GoogleCodeExporter commented 9 years ago
Seems that the leak occurs in rss gadget. Perhaps in xml http request.

Original comment by james...@gmail.com on 17 May 2008 at 10:35

GoogleCodeExporter commented 9 years ago

Original comment by phnix...@gmail.com on 30 May 2008 at 7:02