! Please note that this is a snapshot of our old Bugzilla server, which is read only since May 29, 2020. Please go to gitlab.xfce.org for our new server !
void "Gtk::*Store::set_value" have memory leak
Status:
RESOLVED: WONTFIX
Severity:
critical

Comments

Description wicker25 2009-06-30 16:08:15 CEST
void
Gtk::ListStore::set_value(const TreeIter& iter, int column, const char *str)
{
	G::Value value(gtk_list_store()->column_headers[column]);
	value.set(String(str));
	gtk_list_store_set_value(gtk_list_store(), iter, column,value.g_value());
}

The "GValue" struct does not properly deallocate.

Correct is:

void
Gtk::ListStore::set_value(const TreeIter& iter, int column, const char *str)
{
	G::Value value(gtk_list_store()->column_headers[column]);
	value.set(String(str));
	gtk_list_store_set_value(gtk_list_store(), iter, column,value.g_value());
	g_value_unset( value.g_value() );
	g_free( value.g_value() );
}

See other similar functions in ".inl" file .
Comment 1 Skunnyk editbugs 2018-09-22 16:44:02 CEST
This project has been archived, so we are closing related bugs.

Bug #5519

Reported by:
wicker25
Reported on: 2009-06-30
Last modified on: 2018-09-22

People

Assignee:
XFC Bugs Triage
CC List:
0 users

Version

Version:
unspecified

Attachments

Additional information