We read every piece of feedback, and take your input very seriously.
To see all available qualifiers, see our documentation.
1 parent d4981f0 commit 5551f94Copy full SHA for 5551f94
generate/templates/manual/include/cleanup_handle.h
@@ -5,6 +5,12 @@
5
#include <memory>
6
#include <string>
7
8
+extern "C" {
9
+ #include <git2.h>
10
+ #include <git2/sys/filter.h>
11
+}
12
+
13
14
namespace nodegit {
15
class CleanupHandle {
16
public:
@@ -14,6 +20,12 @@ namespace nodegit {
20
21
class FilterRegistryCleanupHandles : public CleanupHandle {
22
23
+ ~FilterRegistryCleanupHandles() {
24
+ for(std::map<std::string, std::shared_ptr<CleanupHandle>>::iterator iter = registeredFilters.begin(); iter != registeredFilters.end(); ++iter) {
25
+ std::string filtername = iter->first;
26
+ git_filter_unregister(filtername.c_str());
27
+ }
28
17
29
std::map<std::string, std::shared_ptr<CleanupHandle>> registeredFilters;
18
30
};
19
31
}
0 commit comments