summaryrefslogtreecommitdiffhomepage
path: root/doc/mrbgems/README.md
diff options
context:
space:
mode:
Diffstat (limited to 'doc/mrbgems/README.md')
-rw-r--r--doc/mrbgems/README.md15
1 files changed, 15 insertions, 0 deletions
diff --git a/doc/mrbgems/README.md b/doc/mrbgems/README.md
index 9e930d8b2..fb27aa37b 100644
--- a/doc/mrbgems/README.md
+++ b/doc/mrbgems/README.md
@@ -106,6 +106,21 @@ mrb_c_extension_example_gem_init(mrb_state* mrb) {
}
```
+### Finalize
+
+mrbgems expects that you have implemented a C method called
+```mrb_YOURGEMNAME_gem_final(mrb_state)```. ```YOURGEMNAME``` will be replaced
+by the name of your GEM. If you call your GEM *c_extension_example*, your
+finalizer method could look like this:
+
+```
+void
+mrb_c_extension_example_gem_final(mrb_state* mrb) {
+ free(someone);
+}
+```
+
+
### Example
```