当前位置: 首页>>代码示例>>C++>>正文


C++ eina_hash_free函数代码示例

本文整理汇总了C++中eina_hash_free函数的典型用法代码示例。如果您正苦于以下问题:C++ eina_hash_free函数的具体用法?C++ eina_hash_free怎么用?C++ eina_hash_free使用的例子?那么恭喜您, 这里精选的函数代码示例或许可以为您提供帮助。


在下文中一共展示了eina_hash_free函数的15个代码示例,这些例子默认根据受欢迎程度排序。您可以为喜欢或者感觉有用的代码点赞,您的评价将有助于系统推荐出更棒的C++代码示例。

示例1: uninit

/**
 * Close anything opened by this module
 */
Eina_Bool uninit(DB *db) {
	EINA_SAFETY_ON_NULL_RETURN_VAL(db, EINA_FALSE);
	INF("Uninitializing source 'zrpcdb'");

	if (db->config)
		db_config_free(db->config);

	if (db->e){
		INF("Connection pool teardown for 'zrpcdb'");
		esql_free(db->e);
		INF("Uninitialization of source 'zrpcdb' complete");
	}
	if (--init_count == 0){
		ecore_event_handler_del(zrpc_res);
		zrpc_res = NULL;
		ecore_event_handler_del(zrpc_err);
		zrpc_err = NULL;
	}
	if (type_cbs) eina_hash_free(type_cbs);
	type_cbs = NULL;
	if (db_cbs) eina_hash_free(db_cbs);
	db_cbs = NULL;
	if (db_cb_params) eina_hash_free(db_cb_params);
	db_cb_params = NULL;

	esql_shutdown();
	eina_shutdown();
	return EINA_TRUE;
}
开发者ID:zmike,项目名称:ezrpc,代码行数:32,代码来源:zrpcdb.c

示例2: ewk_js_class_free

/**
 * Release resources allocated by @a cls.
 *
 * @param cls @a Ewk_JS_Class to be released.
 */
void ewk_js_class_free(Ewk_JS_Class* jsClass)
{
    EINA_SAFETY_ON_NULL_RETURN(jsClass);
    eina_hash_free(jsClass->methods);
    eina_hash_free(jsClass->properties);
    free(jsClass);
}
开发者ID:dog-god,项目名称:iptv,代码行数:12,代码来源:ewk_js.cpp

示例3: azy_client_free

/**
 * @brief Free an #Azy_Client
 *
 * This function frees a client and ALL associated data.  If called
 * on a connected client, azy_client_close will be called and then the client
 * will be freed.
 * @param client The client (NOT NULL)
 */
void
azy_client_free(Azy_Client *client)
{
   DBG("(client=%p)", client);

   if (!AZY_MAGIC_CHECK(client, AZY_MAGIC_CLIENT))
     {
        AZY_MAGIC_FAIL(client, AZY_MAGIC_CLIENT);
        return;
     }

   if (client->connected)
     azy_client_close(client);
   AZY_MAGIC_SET(client, AZY_MAGIC_NONE);
   if (client->addr)
     eina_stringshare_del(client->addr);
   if (client->session_id)
     eina_stringshare_del(client->session_id);
   if (client->add)
     ecore_event_handler_del(client->add);
   if (client->del)
     ecore_event_handler_del(client->del);
   if (client->upgrade)
     ecore_event_handler_del(client->upgrade);
   if (client->callbacks)
     eina_hash_free(client->callbacks);
   if (client->free_callbacks)
     eina_hash_free(client->free_callbacks);
   if (client->conns)
     client->conns = eina_list_free(client->conns);
   free(client);
}
开发者ID:amitesh-singh,项目名称:Enlightenment,代码行数:40,代码来源:azy_client.c

示例4: e_dnd_shutdown

EINTERN int
e_dnd_shutdown(void)
{
   E_FREE_LIST(_drag_list, e_object_del);

   _active_handlers = eina_list_free(_active_handlers);
   E_FREE_LIST(_drop_handlers, e_drop_handler_del);

   E_FREE_LIST(_event_handlers, ecore_event_handler_del);

   eina_hash_free(_drop_win_hash);

   eina_hash_free(_drop_handlers_responsives);

   eina_stringshare_del(_type_text_uri_list);
   eina_stringshare_del(_type_xds);
   eina_stringshare_del(_type_text_x_moz_url);
   eina_stringshare_del(_type_enlightenment_x_file);
   _type_text_uri_list = NULL;
   _type_xds = NULL;
   _type_text_x_moz_url = NULL;
   _type_enlightenment_x_file = NULL;
   _text_atom = 0;

   return 1;
}
开发者ID:FlorentRevest,项目名称:Enlightenment,代码行数:26,代码来源:e_dnd.c

示例5: evas_font_dir_cache_free

void
evas_font_dir_cache_free(void)
{
   if (font_dirs)
     {
        eina_hash_foreach(font_dirs, font_cache_dir_free, NULL);
        eina_hash_free(font_dirs);
        font_dirs = NULL;
     }

#ifdef HAVE_FONTCONFIG
   if (fc_init > 0)
     {
        fc_init--;
/* this is bad i got a:
 * fccache.c:512: FcCacheFini: Assertion fcCacheChains[i] == ((void *)0)' failed.   
 * 
 * all i can do for now is shut this puppy down. butthat breaks, so disable
 * it as in reality - there is little reason to care about the memory not
 * being freed etc.
 * 
 * note 04/08/2012 - this doesnt seem to cause an issue anymore?
 */
        if (fc_init == 0) FcFini();
     }
#endif
}
开发者ID:wjhendr,项目名称:enlightenment,代码行数:27,代码来源:evas_font_dir.c

示例6: efreet_desktop_shutdown

/**
 * @internal
 * @returns the number of initializations left for this system
 * @brief Attempts to shut down the subsystem if nothing else is using it
 */
void
efreet_desktop_shutdown(void)
{
    Efreet_Desktop_Type_Info *info;
    char *dir;

    if (efreet_desktop_exe_handler) ecore_event_handler_del(efreet_desktop_exe_handler);
    IF_RELEASE(desktop_environment);
    IF_FREE_HASH(efreet_desktop_cache);
    while (efreet_desktop_types)
    {
        info = eina_list_data_get(efreet_desktop_types);
        efreet_desktop_type_info_free(info);
        efreet_desktop_types = eina_list_remove_list(efreet_desktop_types,
                                                     efreet_desktop_types);
    }
    EINA_LIST_FREE(efreet_desktop_dirs, dir)
        eina_stringshare_del(dir);
    if (cache_monitor) ecore_file_monitor_del(cache_monitor);
    if (change_monitors) eina_hash_free(change_monitors);
    if (cache) eet_close(cache);
    efreet_desktop_edd_shutdown(desktop_edd);
    ecore_file_shutdown();
    eina_log_domain_unregister(_efreet_desktop_log_dom);
    IF_RELEASE(cache_file);
    IF_RELEASE(cache_dirs);
    if (efreet_desktop_job) ecore_job_del(efreet_desktop_job);
    efreet_desktop_job = NULL;
}
开发者ID:OpenInkpot-archive,项目名称:efreet,代码行数:34,代码来源:efreet_desktop.c

示例7: _gc_shutdown

/**
 * Module specific face freeing.
 *
 * It is called when a face is freed.
 *
 * @param   data the pointer you passed to e_gadget_new().
 * @param   face a pointer to your E_Gadget_Face.
 * @ingroup Emu_Module_Gadget_Group
 */
static void
_gc_shutdown(E_Gadcon_Client *gcc)
{
   Emu_Face *emu_face;

   emu_face = gcc->data;
   if (emu_face)
     {
        eina_hash_foreach(emu_face->menus, _emu_menus_hash_cb_free, NULL);
        eina_hash_free(emu_face->menus);
        emu_face->menus = NULL;

        if (emu_face->read)
           ecore_event_handler_del(emu_face->read);
        if (emu_face->add)
           ecore_event_handler_del(emu_face->add);
        if (emu_face->del)
           ecore_event_handler_del(emu_face->del);

        if (emu_face->exe)
           ecore_exe_terminate(emu_face->exe);
        if (emu_face->command)
           eina_stringshare_del(emu_face->command);

        evas_object_del(emu_face->o_button);
        E_FREE(emu_face);
     }
}
开发者ID:playya,项目名称:Enlightenment,代码行数:37,代码来源:e_mod_main.c

示例8: efreet_cache_shutdown

void
efreet_cache_shutdown(void)
{
    Efreet_Old_Cache *d;

    IF_RELEASE(theme_name);

    icon_cache = efreet_cache_close(icon_cache);
    icon_theme_cache = efreet_cache_close(icon_theme_cache);

    IF_FREE_HASH(themes);
    IF_FREE_HASH(icons);
    IF_FREE_HASH(fallbacks);

    IF_FREE_HASH_CB(desktops, EINA_FREE_CB(efreet_cache_desktop_free));
    desktop_cache = efreet_cache_close(desktop_cache);
    IF_RELEASE(desktop_cache_file);

    efreet_cache_edd_shutdown();
    IF_RELEASE(icon_theme_cache_file);

    if (old_desktop_caches)
        ERR("This application has not properly closed all its desktop references!");
    EINA_LIST_FREE(old_desktop_caches, d)
    {
        eina_hash_free(d->hash);
        eet_close(d->ef);
        free(d);
    }
开发者ID:jgfenix,项目名称:efl,代码行数:29,代码来源:efreet_cache.c

示例9: e_mod_comp_atoms_shutdown

EINTERN int
e_mod_comp_atoms_shutdown(void)
{
   if (atoms_hash) eina_hash_free(atoms_hash);
   atoms_hash = NULL;
   return 1;
}
开发者ID:tizenorg,项目名称:framework.uifw.e17-extra-modules,代码行数:7,代码来源:e_mod_comp_atoms.c

示例10: START_TEST

END_TEST

START_TEST(eina_hash_extended)
{
   Eina_Hash *hash = NULL;
   int i;

        fail_if(eina_init() != 2);

   hash = eina_hash_string_djb2_new(NULL);
        fail_if(hash == NULL);

        fail_if(eina_hash_direct_add(hash, "42", "42") != EINA_TRUE);

   for (i = 43; i < 3043; ++i)
     {
        char *tmp = malloc(10);
        fail_if(!tmp);
        eina_convert_itoa(i, tmp);
        fail_if(eina_hash_direct_add(hash, tmp, tmp) != EINA_TRUE);
     }

        fail_if(eina_hash_find(hash, "42") == NULL);

        eina_hash_free(hash);

   fail_if(eina_shutdown() != 1);
}
开发者ID:Limsik,项目名称:e17,代码行数:28,代码来源:eina_test_hash.c

示例11: main

int main(int c, char **v)
{
   int wfd, rfd;
   Slave_Command cmd;
   void *params = NULL;
   Eina_Module *m;
   Eina_Bool quit = EINA_FALSE;

   if (c < 3)
     return 1;

   eina_init();
   pfx =  eina_prefix_new(v[0], main,
                          "EVAS", "evas", "checkme",
                          PACKAGE_BIN_DIR,
                          PACKAGE_LIB_DIR,
                          PACKAGE_DATA_DIR,
                          PACKAGE_DATA_DIR);

   loaders = eina_hash_string_superfast_new(NULL);
   evas_module_init();

   wfd = atoi(v[1]);
   rfd = atoi(v[2]);

   while (!quit)
     {
        if (!command_read(rfd, &cmd, &params))
          {
             error_send(wfd, CSERVE2_INVALID_COMMAND);
             return 1;
          }
        switch (cmd)
          {
           case IMAGE_OPEN:
             handle_image_open(wfd, params);
             break;
           case IMAGE_LOAD:
             handle_image_load(wfd, params);
             break;
           case SLAVE_QUIT:
             quit = EINA_TRUE;
             break;
           default:
             error_send(wfd, CSERVE2_INVALID_COMMAND);
          }
     }

   evas_module_shutdown();
   eina_hash_free(loaders);

   EINA_LIST_FREE(modules, m)
      eina_module_free(m);

   eina_prefix_free(pfx);
   eina_shutdown();

   return 0;
}
开发者ID:jigpu,项目名称:efl,代码行数:59,代码来源:evas_cserve2_slave.c

示例12: _eio_file_heavy

static void
_eio_file_heavy(void *data, Ecore_Thread *thread)
{
   Eio_File_Char_Ls *async = data;
   Eina_Iterator *ls;
   const char *file;
   Eina_List *pack = NULL;
   double start;

   ls = eina_file_ls(async->ls.directory);
   if (!ls)
     {
	eio_file_thread_error(&async->ls.common, thread);
	return;
     }

   eio_file_container_set(&async->ls.common, eina_iterator_container_get(ls));

   start = ecore_time_get();

   EINA_ITERATOR_FOREACH(ls, file)
     {
	Eina_Bool filter = EINA_TRUE;

	if (async->filter_cb)
	  {
	     filter = async->filter_cb((void*) async->ls.common.data, &async->ls.common, file);
	  }

	if (filter)
          {
             Eio_File_Char *send_fc;

             send_fc = eio_char_malloc();
             if (!send_fc) goto on_error;

             send_fc->filename = file;
	     send_fc->associated = async->ls.common.worker.associated;
	     async->ls.common.worker.associated = NULL;

	     pack = eina_list_append(pack, send_fc);
          }
	else
          {
          on_error:
             eina_stringshare_del(file);

             if (async->ls.common.worker.associated)
               {
                  eina_hash_free(async->ls.common.worker.associated);
                  async->ls.common.worker.associated = NULL;
               }
          }

        pack = eio_pack_send(thread, pack, &start);

	if (ecore_thread_check(thread))
	  break;
     }
开发者ID:wargio,项目名称:efl,代码行数:59,代码来源:eio_file.c

示例13: e_datastore_del

E_API void
e_datastore_del(char *key)
{
   eina_hash_del(store, key, NULL);
   if (eina_hash_population(store)) return;
   eina_hash_free(store);
   store = NULL;
}
开发者ID:FlorentRevest,项目名称:Enlightenment,代码行数:8,代码来源:e_datastore.c

示例14: protocol_shutdown

EMAPI int
protocol_shutdown(void)
{
   ecore_con_shutdown();
   if (_irc_servers)
     eina_hash_free(_irc_servers);
   return 1;
}
开发者ID:Limsik,项目名称:e17,代码行数:8,代码来源:irc.c

示例15: _grabber_tmdb_shutdown

static void
_grabber_tmdb_shutdown(void)
{
   INF("Shutdown TMDb grabber");
   eina_hash_free(_hash_req);
   free(_stats);
   ecore_con_url_shutdown();
   ecore_con_shutdown();
}
开发者ID:chep,项目名称:Enna-Media-Server,代码行数:9,代码来源:ems_grabber_tmdb.c


注:本文中的eina_hash_free函数示例由纯净天空整理自Github/MSDocs等开源代码及文档管理平台,相关代码片段筛选自各路编程大神贡献的开源项目,源码版权归原作者所有,传播和使用请参考对应项目的License;未经允许,请勿转载。