aboutsummaryrefslogtreecommitdiff
path: root/includes/hardinfo.h
diff options
context:
space:
mode:
authorBurt P <pburt0@gmail.com>2019-07-25 20:43:25 -0500
committerLeandro A. F. Pereira <leandro@hardinfo.org>2019-07-29 19:44:59 -0700
commit6938cbfd0c8d64aa93633fc7423879de757fd45c (patch)
tree359dd94243c72f29da8d848dbe5f23dd84b35fbc /includes/hardinfo.h
parent9d043ceb42468af2f18b823e7dd5d026ef24b0b1 (diff)
replace idle_free() with auto_free() from sysobj
* auto_free() works in both report mode and gui mode. * auto_free() only creates one recuring event for the whole system rather than idle_free()'s one event per call. * auto_free_ex() allows specifying the free function to use. * auto_free() is thread-aware, free_auto_free_thread_final() can be used to clean up on thread exit. * auto_free() has some tweakability. Signed-off-by: Burt P <pburt0@gmail.com>
Diffstat (limited to 'includes/hardinfo.h')
-rw-r--r--includes/hardinfo.h11
1 files changed, 5 insertions, 6 deletions
diff --git a/includes/hardinfo.h b/includes/hardinfo.h
index 6b9e33af..5c9863cc 100644
--- a/includes/hardinfo.h
+++ b/includes/hardinfo.h
@@ -117,12 +117,11 @@ gchar *file_chooser_build_filename(GtkWidget *chooser, gchar *extension);
gpointer file_types_get_data_by_name(FileTypes *file_types, gchar *name);
/* Misc utility functions */
-#if RELEASE == 1
-gpointer idle_free(gpointer ptr);
-#else
-gpointer __idle_free(gpointer ptr, gchar *f, gint l);
-#define idle_free(p) __idle_free(p, __FILE__, __LINE__)
-#endif /* RELEASE == 1 */
+#if !(RELEASE == 1)
+#define DEBUG_AUTO_FREE 2
+#endif
+#include "auto_free.h"
+#define idle_free(ptr) auto_free(ptr)
gchar *find_program(gchar *program_name);
gchar *size_human_readable(gfloat size);