From 09da7a0b6c57413eef2ada19f89b5d96102326be Mon Sep 17 00:00:00 2001 From: c9s Date: Tue, 3 Jun 2014 20:44:35 +0800 Subject: [PATCH] update README --- README.md | 19 ++++++++++++++++++- 1 file changed, 18 insertions(+), 1 deletion(-) diff --git a/README.md b/README.md index 2928f78..51ca996 100644 --- a/README.md +++ b/README.md @@ -92,7 +92,11 @@ if (matched_node) { r3_tree_free(n); ``` -If you want to capture the variables from regular expression, you will need to create a match entry, + +**Capture Dynamic Variables** + +If you want to capture the variables from regular expression, you will need to +create a `match_entry` object and pass the object to `r3_tree_matchl` function, the catched variables will be pushed into the match entry structure: ```c @@ -116,6 +120,19 @@ When using `match_entry`, you may match the route with `r3_tree_match_entry` fun node *matched_node = r3_tree_match_entry(n, entry); ``` + + + +**Release Memroy** + +To release the memory, you may call `r3_tree_free(node *tree)` to release the whole tree structure, +`node*`, `edge*`, `route*` objects that were inserted into the tree will be freed. + + + + + + ### Routing with conditions ```c