title: logging seems to have memory leak for multi-thread usage
body: <p>I meet one scenario of memory leak in Python, I guess it's related with logging module for multi-thread, but I don't find why.</p>
  
  <p>Version1 (With memory-leak and multi-thread call)</p>
  
  <pre><code>campaign_id_queue = Queue.Queue()
  campaign_worker = {} # it has data inside, key is ID, value is Class object
  for campaign_id, worker in campaign_worker.iteritems():
      campaign_id.queue.put(campaign_id)
  
  thread_list = []
  for n in range(THREAD_NUM): # defined already
      thread_list.append( Thread(target=parallel_run, args=(campaign_id_queue, now, n, logger)))
  
  for thread in thread_list:
      thread.daemon = True
      thread.start()
  campaign_id_queue.join()
  
  # another file
  def parallel_run(campaign_id_queue, now, n, logger):
      while True:
          try:
              campaign_id = campaign_id_queue.get()
          except Queue.Empty:
              logger.warning('Queue empty')
          else:
              try:
                  if worker.open_clients(logger) &lt; 0:
                      logger.error('error here')
                      continue
                  worker.run(now, logger)
              except Exception, e:
                 logger.exception(e)
              finally:
                 campaign_id_queue.task_done()
  </code></pre>
  
  <p>Version2 (Without memory-leak and single-thread call)</p>
  
  <pre><code>campaign_worker = {} # it has data inside, key is ID, value is Class object
  for campaign_id, worker in campaign_worker.iteritems():
      if worker.open_clients(logger) &lt; 0:
          logger.error('error here')
          continue
      worker.run(now, logger)
  </code></pre>