Permalink
Browse files

Automatically setup & teardown the git-thread functions

  • Loading branch information...
jdelStrother committed Sep 30, 2012
1 parent 48eec2c commit 0a0898978429386faf699d2daed926315a8985be
Showing with 10 additions and 0 deletions.
  1. +10 −0 Classes/ObjectiveGit.m
View
@@ -16,3 +16,13 @@ void GTSetupThreads(void) {
extern void GTShutdownThreads(void) {
git_threads_shutdown();
}
+
+__attribute__((constructor))
+static void initializer(void) {
+ GTSetupThreads();
+}
+
+__attribute__((destructor))
+static void finalizer(void) {
+ GTShutdownThreads();
+}

0 comments on commit 0a08989

Please sign in to comment.