From 1d8943c640bad4425b8578aae6f680fa8e513bc7 Mon Sep 17 00:00:00 2001 From: Carlos Martin Nieto Date: Thu, 28 Jun 2012 12:05:49 +0200 Subject: mwindow: allow memory-window files to deregister Once a file is registered, there is no way to deregister it, even after the structure that contains it is no longer needed and has been freed. This may be the source of #624. Allow and use the deregister function to remove our file from the global list. --- src/mwindow.h | 1 + 1 file changed, 1 insertion(+) (limited to 'src/mwindow.h') diff --git a/src/mwindow.h b/src/mwindow.h index 058027251..d4fd19569 100644 --- a/src/mwindow.h +++ b/src/mwindow.h @@ -40,6 +40,7 @@ void git_mwindow_free_all(git_mwindow_file *mwf); unsigned char *git_mwindow_open(git_mwindow_file *mwf, git_mwindow **cursor, git_off_t offset, size_t extra, unsigned int *left); void git_mwindow_scan_lru(git_mwindow_file *mwf, git_mwindow **lru_w, git_mwindow **lru_l); int git_mwindow_file_register(git_mwindow_file *mwf); +int git_mwindow_file_deregister(git_mwindow_file *mwf); void git_mwindow_close(git_mwindow **w_cursor); #endif -- cgit v1.2.1