Skip to content

Commit 6d922d8

Browse files
Clarify when to release
1 parent 828784f commit 6d922d8

File tree

1 file changed

+1
-1
lines changed

1 file changed

+1
-1
lines changed

README.md

Lines changed: 1 addition & 1 deletion
Original file line numberDiff line numberDiff line change
@@ -315,7 +315,7 @@ This token structure closely matches the JSON syntax. When decoding XML, the fol
315315
char *echttp_parser_load (const char *file);
316316
void echttp_parser_free (char *buffer);
317317
```
318-
These functions are used to load the entire content of a JSON or XML file in a buffer, before parsing the data. The buffer is dynamically allocated, and must be released.
318+
These functions are used to load the entire content of a JSON or XML file in a buffer, before parsing the data. The buffer is dynamically allocated, and must be released once the data is no longer used. Because the parsed tokens rely on the buffer's content, the buffer should be released only after the tokens have been discarded.
319319

320320
```
321321
int echttp_json_search (const ParserToken *parent, const char *path);

0 commit comments

Comments
 (0)