aboutsummaryrefslogtreecommitdiff
path: root/hardinfo/util.c
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 /hardinfo/util.c
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 'hardinfo/util.c')
-rw-r--r--hardinfo/util.c22
1 files changed, 0 insertions, 22 deletions
diff --git a/hardinfo/util.c b/hardinfo/util.c
index c8c99224..b35b2461 100644
--- a/hardinfo/util.c
+++ b/hardinfo/util.c
@@ -1031,28 +1031,6 @@ gint tree_view_get_visible_height(GtkTreeView * tv)
return nrows * rect.height;
}
-static gboolean __idle_free_do(gpointer ptr)
-{
- g_free(ptr);
-
- return FALSE;
-}
-
-#if RELEASE == 1
-gpointer idle_free(gpointer ptr)
-#else
-gpointer __idle_free(gpointer ptr, gchar * f, gint l)
-#endif
-{
- DEBUG("file: %s, line: %d, ptr %p", f, l, ptr);
-
- if (ptr) {
- g_timeout_add(10000, __idle_free_do, ptr);
- }
-
- return ptr;
-}
-
void module_entry_scan_all_except(ModuleEntry * entries, gint except_entry)
{
ModuleEntry entry;