Logo Search packages:      
Sourcecode: libnl2 version File versions  Download package

void nl_cache_mngr_free ( struct nl_cache_mngr *  mngr  ) 

Free cache manager and all caches.

  • mngr Cache manager.
Release all resources after usage of a cache manager.

Definition at line 362 of file cache_mngr.c.

References nl_cache_free(), and nl_close().

Referenced by nl_cache_mngr_alloc().

{
      int i;

      if (!mngr)
            return;

      if (mngr->cm_handle)
            nl_close(mngr->cm_handle);

      for (i = 0; i < mngr->cm_nassocs; i++)
            if (mngr->cm_assocs[i].ca_cache)
                  nl_cache_free(mngr->cm_assocs[i].ca_cache);

      free(mngr->cm_assocs);
      free(mngr);

      NL_DBG(1, "Cache manager %p freed\n", mngr);
}


Generated by  Doxygen 1.6.0   Back to index