Changeset 696

Show
Ignore:
Timestamp:
12/29/09 13:58:30 (2 years ago)
Author:
erikd
Message:

Plug more per-open-file memory leaks.

Files:

Legend:

Unmodified
Added
Removed
Modified
Copied
Moved
  • sweep/trunk/src/sweep_sample.c

    r695 r696  
    638638  /* trim_registered_ops (s, 0); */ 
    639639 
     640  g_list_free (s->views); 
     641  g_free (s->pathname); 
     642 
     643  g_mutex_free (s->ops_mutex); 
     644  g_mutex_free (s->edit_mutex); 
     645  g_mutex_free (s->play_mutex); 
     646 
     647  g_list_free (s->registered_ops); 
     648  g_list_free (s->current_undo); 
     649  g_list_free (s->current_redo); 
     650  g_list_free (s->pending_ops); 
     651 
     652  if (s->info_clist) 
     653    gtk_widget_destroy (s->info_clist); 
     654 
     655  if (s->last_tmp_message) { 
     656    memset (s->last_tmp_message, 0, strlen (s->last_tmp_message)); 
     657    g_free (s->last_tmp_message); 
     658  } 
     659 
     660  memset (s, 0, sizeof (*s)); 
    640661  g_free (s); 
    641662} 
  • sweep/trunk/src/sweep_sounddata.c

    r688 r696  
    9898sounddata_destroy (sw_sounddata * sounddata) 
    9999{ 
    100   /*size_t len;*/ 
    101  
    102100  sounddata->refcount--; 
    103101 
     
    106104    g_mutex_free(sounddata->data_mutex); 
    107105    sounddata_clear_selection (sounddata); 
     106    memset (sounddata, 0, sizeof (*sounddata)); 
    108107    g_free (sounddata); 
    109108  }