Logo Search packages:      
Sourcecode: ygraph version File versions  Download package

void plot_free ( Plot plot  ) 

Free the space that has been allocated to a plot structure.

Parameters:
plot The plot to free.
Todo:
Check that all the Plot components are properly freed.

Definition at line 369 of file plot_window.c.

References _Plot::current_directory, _Plot::current_frame, _Plot::data, _Plot::plot_data, plotline_free(), _Plot::zoom_history_end, and _Plot::zoom_history_start.

Referenced by plot_window_destroy().

{
  guint i;

  for (i=0; i<plot->data->len; ++i)
    plotline_free(g_array_index(plot->plot_data, PlotLine*, i));
  g_array_free(plot->data, TRUE);
  g_array_free(plot->plot_data, TRUE);
  g_array_free(plot->current_frame, TRUE);
  if (plot->zoom_history_start)
    g_array_free(plot->zoom_history_start, TRUE);
  if (plot->zoom_history_end)
    g_array_free(plot->zoom_history_end, TRUE);
  g_free(plot->current_directory);
  g_free(plot);
  plot=NULL;
}


Generated by  Doxygen 1.6.0   Back to index