From 270be8160493eb25ee43eb7db8dda2504343dc65 Mon Sep 17 00:00:00 2001 From: Adam Spiers Date: Sun, 6 Jan 2013 16:58:05 +0000 Subject: dir.c: provide clear_directory() for reclaiming dir_struct memory By the end of a directory traversal, a dir_struct instance will typically contains pointers to various data structures on the heap. clear_directory() provides a convenient way to reclaim that memory. Signed-off-by: Adam Spiers Signed-off-by: Junio C Hamano --- Documentation/technical/api-directory-listing.txt | 2 ++ 1 file changed, 2 insertions(+) (limited to 'Documentation/technical') diff --git a/Documentation/technical/api-directory-listing.txt b/Documentation/technical/api-directory-listing.txt index fa9c8ae461..fbceb629ab 100644 --- a/Documentation/technical/api-directory-listing.txt +++ b/Documentation/technical/api-directory-listing.txt @@ -81,4 +81,6 @@ marked. If you to exclude files, make sure you have loaded index first. * Use `dir.entries[]`. +* Call `free_directory()` when none of the contained elements are no longer in use. + (JC) -- cgit v1.2.1