--- 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);
}
}