diff options
author | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-05-28 11:05:54 +0000 |
---|---|---|
committer | vlefevre <vlefevre@280ebfd0-de03-0410-8827-d642c229c3f4> | 2018-05-28 11:05:54 +0000 |
commit | 8b82d646d61497fca4e7d8f661bcf14ed3396102 (patch) | |
tree | 63b0ff7c2b2f6a775d081f32da0aed824e3a3c7f /examples | |
parent | 5c8047a69053b7a9c01f8f8ee958c522e8dd6b1a (diff) | |
download | mpfr-8b82d646d61497fca4e7d8f661bcf14ed3396102.tar.gz |
[examples] Added "mpfr_free_cache ();" at the end of all programs,
as this is something that should be done systematically (at least
to detect memory leaks with valgrind).
git-svn-id: svn://scm.gforge.inria.fr/svn/mpfr/trunk@12717 280ebfd0-de03-0410-8827-d642c229c3f4
Diffstat (limited to 'examples')
-rw-r--r-- | examples/can_round.c | 1 | ||||
-rw-r--r-- | examples/divworst.c | 1 | ||||
-rw-r--r-- | examples/rndo-add.c | 1 | ||||
-rw-r--r-- | examples/sample.c | 1 | ||||
-rw-r--r-- | examples/version.c | 1 |
5 files changed, 5 insertions, 0 deletions
diff --git a/examples/can_round.c b/examples/can_round.c index bc998e93e..5234a5fe8 100644 --- a/examples/can_round.c +++ b/examples/can_round.c @@ -60,5 +60,6 @@ main (void) } mpfr_clear (x); mpfr_clear (y); + mpfr_free_cache (); return 0; } diff --git a/examples/divworst.c b/examples/divworst.c index fe3a184ee..56628a20d 100644 --- a/examples/divworst.c +++ b/examples/divworst.c @@ -93,5 +93,6 @@ int main (int argc, char *argv[]) } mpfr_clears (VARS, (mpfr_ptr) 0); + mpfr_free_cache (); return 0; } diff --git a/examples/rndo-add.c b/examples/rndo-add.c index 8731ec757..613069f9a 100644 --- a/examples/rndo-add.c +++ b/examples/rndo-add.c @@ -87,5 +87,6 @@ int main (int argc, char **argv) mpfr_printf ("z = %.*Rb\n", pprec, z); mpfr_clears (LIST, (mpfr_ptr) 0); + mpfr_free_cache (); return 0; } diff --git a/examples/sample.c b/examples/sample.c index 2797d37c4..bc68b1900 100644 --- a/examples/sample.c +++ b/examples/sample.c @@ -52,5 +52,6 @@ int main (void) mpfr_clear (s); mpfr_clear (t); mpfr_clear (u); + mpfr_free_cache (); return 0; } diff --git a/examples/version.c b/examples/version.c index 5a2935353..57c839618 100644 --- a/examples/version.c +++ b/examples/version.c @@ -239,5 +239,6 @@ int main (void) printf ("sizeof(mpfr_ptr) = %d\n", (int) sizeof(mpfr_ptr)); failure_test (); + mpfr_free_cache (); return 0; } |