using GLib;

class cTest:Object {

}

int main() {

	List<cTest> myList= new List<cTest>();

	cTest myObject,myObject2;

	myObject=new cTest();
	stdout.printf("References: %ud\n",myObject.ref_count);
	myList.append(myObject);
	stdout.printf("References: %ud\n",myObject.ref_count);
	myObject2=myList.nth_data(0);
	stdout.printf("References: %ud\n",myObject.ref_count);
	myList.remove(myObject);
	stdout.printf("References: %ud\n",myObject.ref_count);
	return 0;
}
