Is this TreeModel memory leak or something wrong in my code???



Hello,
i'm trying to use Gtk::ListStore. I'm calling this function many times and i see growing memory used by my program in Gnome System Monitor.
What am i doing wrong?


void CAppWindow::events_treeview_add()
{
	// append row
	Gtk::TreeModel::iterator iter = m_ref_events_treeview_model->append();
	Gtk::TreeModel::Row row = *iter;
	
	row[m_events_treeview_columns.m_col_description] = "test";
	
	if (m_ref_events_treeview_model->children().size() > 20) 
	{
		// get first_row
		Gtk::TreeModel::iterator first_row = m_ref_events_treeview_model->children().begin(); // first row
		if (first_row)
			m_ref_events_treeview_model->erase(first_row);
	}
}




[Date Prev][Date Next]   [Thread Prev][Thread Next]   [Thread Index] [Date Index] [Author Index]