mirror of
https://github.com/Z3Prover/z3
synced 2025-04-08 10:25:18 +00:00
add new C API function: Z3_finalize_memory()
Useful to debug memory leaks in Z3 and in client applications Signed-off-by: Nuno Lopes <nlopes@microsoft.com>
This commit is contained in:
parent
6217804ed5
commit
0997d0d2b5
|
@ -516,6 +516,11 @@ extern "C" {
|
|||
memory::initialize(0);
|
||||
}
|
||||
|
||||
void Z3_API Z3_finalize_memory(void) {
|
||||
LOG_Z3_finalize_memory();
|
||||
memory::finalize();
|
||||
}
|
||||
|
||||
Z3_error_code Z3_API Z3_get_error_code(Z3_context c) {
|
||||
LOG_Z3_get_error_code(c);
|
||||
return mk_c(c)->get_error_code();
|
||||
|
|
|
@ -5365,7 +5365,19 @@ END_MLAPI_EXCLUDE
|
|||
*/
|
||||
void Z3_API Z3_reset_memory(void);
|
||||
#endif
|
||||
|
||||
|
||||
#ifdef CorML3
|
||||
/**
|
||||
\brief Destroy all allocated resources.
|
||||
|
||||
Any pointers previously returned by the API become invalid.
|
||||
Can be used for memory leak detection.
|
||||
|
||||
def_API('Z3_finalize_memory', VOID, ())
|
||||
*/
|
||||
void Z3_API Z3_finalize_memory(void);
|
||||
#endif
|
||||
|
||||
/*@}*/
|
||||
|
||||
#ifdef CorML3
|
||||
|
|
Loading…
Reference in a new issue