Merge branch 'rs/discard-index-discard-array'

* rs/discard-index-discard-array:
  read-cache: free cache in discard_index
  read-cache: add simple performance test
This commit is contained in:
Junio C Hamano
2013-06-20 16:02:30 -07:00
5 changed files with 32 additions and 2 deletions

View File

@ -1520,8 +1520,9 @@ int discard_index(struct index_state *istate)
free_name_hash(istate);
cache_tree_free(&(istate->cache_tree));
istate->initialized = 0;
/* no need to throw away allocated active_cache */
free(istate->cache);
istate->cache = NULL;
istate->cache_alloc = 0;
return 0;
}