use warnings;
use strict;
use Gtk3 -init;
use 5.010;

my $tree_store = Gtk3::TreeStore->new( qw/Glib::String/ );

my $iter;
for (1..2) {
	$iter = $tree_store->append( undef );
	#$tree_store->set( $iter, 0 => 'test ' );
}

=head2 this is hopefully an equivalent in C (it works)

	#include <gtk/gtk.h>
	int main(int argc, char* argv[]) {
		GtkTreeStore* s;
		GtkTreeIter iter;
		int i;
	
		gtk_init( &argc, &argv );
		s = gtk_tree_store_new(1, G_TYPE_STRING);
	
		for (i=0; i<2; i++) {
			gtk_tree_store_append(s, &iter, NULL);
			//gtk_tree_store_set(s, &iter, 0, "test", -1);
		}
		return 0;
	}
=cut

# G_SLICE=debug-blocks perl test.pl
# GSlice: MemChecker: attempt to release non-allocated block: 0x956af20 size=16
