* public functions
*/
library_t public;
-
-#ifdef LEAK_DETECTIVE
- /**
- * Memory leak detective, if enabled
- */
- leak_detective_t *detective;
-#endif /* LEAK_DETECTIVE */
};
/**
this->public.integrity->destroy(this->public.integrity);
}
-#ifdef LEAK_DETECTIVE
- if (this->detective)
+ if (lib->leak_detective)
{
- this->detective->report(this->detective, detailed);
- this->detective->destroy(this->detective);
+ lib->leak_detective->report(lib->leak_detective, detailed);
+ lib->leak_detective->destroy(lib->leak_detective);
}
-#endif /* LEAK_DETECTIVE */
threads_deinit();
threads_init();
- lib->leak_detective = FALSE;
-
+ lib->leak_detective = NULL;
#ifdef LEAK_DETECTIVE
- this->detective = leak_detective_create();
+ lib->leak_detective = leak_detective_create();
#endif /* LEAK_DETECTIVE */
pfh = printf_hook_create();
#include "credentials/credential_factory.h"
#include "credentials/credential_manager.h"
#include "credentials/cred_encoding.h"
+#include "utils/leak_detective.h"
typedef struct library_t library_t;
integrity_checker_t *integrity;
/**
- * is leak detective running?
+ * Leak detective, if built and enabled
*/
- bool leak_detective;
+ leak_detective_t *leak_detective;
};
/**