project_files/frontlib/model/schemelist.c
changeset 7464 859ab6859854
parent 7320 e704706008d4
child 7482 d70a5b0d1190
--- a/project_files/frontlib/model/schemelist.c	Thu Aug 02 16:36:11 2012 +0200
+++ b/project_files/frontlib/model/schemelist.c	Mon Aug 06 22:31:02 2012 +0200
@@ -30,16 +30,6 @@
 #include <limits.h>
 #include <string.h>
 
-static void flib_schemelist_destroy(flib_schemelist *list) {
-	if(list) {
-		for(int i=0; i<list->schemeCount; i++) {
-			flib_scheme_release(list->schemes[i]);
-		}
-		free(list->schemes);
-		free(list);
-	}
-}
-
 static char *makePrefixedName(int schemeIndex, const char *settingName) {
 	return flib_asprintf("%i\\%s", schemeIndex, settingName);
 }
@@ -183,19 +173,16 @@
 }
 
 flib_schemelist *flib_schemelist_create() {
-	return flib_schemelist_retain(flib_calloc(1, sizeof(flib_schemelist)));
+	return flib_calloc(1, sizeof(flib_schemelist));
 }
 
-flib_schemelist *flib_schemelist_retain(flib_schemelist *list) {
+void flib_schemelist_destroy(flib_schemelist *list) {
 	if(list) {
-		flib_retain(&list->_referenceCount, "flib_schemelist");
-	}
-	return list;
-}
-
-void flib_schemelist_release(flib_schemelist *list) {
-	if(list && flib_release(&list->_referenceCount, "flib_schemelist")) {
-		flib_schemelist_destroy(list);
+		for(int i=0; i<list->schemeCount; i++) {
+			flib_scheme_release(list->schemes[i]);
+		}
+		free(list->schemes);
+		free(list);
 	}
 }