From a3e9765f36810efdbd666feee307f06fec0fe3b2 Mon Sep 17 00:00:00 2001 From: Heng Li Date: Tue, 16 Aug 2016 17:45:40 -0400 Subject: [PATCH] forgot to deallocate in kexpr example --- index.html | 3 ++- 1 file changed, 2 insertions(+), 1 deletion(-) diff --git a/index.html b/index.html index 85d981e..19d6942 100644 --- a/index.html +++ b/index.html @@ -8604,7 +8604,7 @@ int main(int argc, char *argv[]) } ``` -
+
!!Synopsis
 * Functionality: parse a mathematical expression with the [[Shunting-yard algorithm|https://en.wikipedia.org/wiki/Shunting-yard_algorithm]] and evaluate the final value. The library supports functions and variables.
 * Library source code: [[kexpr.h|https://github.com/attractivechaos/klib/blob/master/kexpr.h]] and [[kexpr.c|https://github.com/attractivechaos/klib/blob/master/kexpr.c]]
@@ -8624,6 +8624,7 @@ int main()
 	ke_set_real(ke, "x", 1.0);               // set the value of a variable
 	ke_set_real_func1(ke, "myexp", exp);     // define a math function
 	printf("%g\n", ke_eval_real(ke, &err));  // compute the expression
+	ke_destroy(ke);                          // deallocate
 	return 0;
 }
 ```
-- 
2.47.3