diff options
author | Anatoly Galiulin <galiulin.anatoly@gmail.com> | 2017-02-13 19:37:20 +0700 |
---|---|---|
committer | Andreas Rumpf <rumpf_a@web.de> | 2017-02-13 13:37:20 +0100 |
commit | 6fa1dba515e514ea9a4ac5850b0188fb6cf95fbf (patch) | |
tree | 83022f414ebf91f5bc144f77982439be8c6381a3 /doc/backends.txt | |
parent | 279e4b045133bad59e349520547e5220408b232e (diff) | |
download | Nim-6fa1dba515e514ea9a4ac5850b0188fb6cf95fbf.tar.gz |
Add ``tearDownForeignThreadGc`` function (#5369)
Diffstat (limited to 'doc/backends.txt')
-rw-r--r-- | doc/backends.txt | 8 |
1 files changed, 8 insertions, 0 deletions
diff --git a/doc/backends.txt b/doc/backends.txt index 5846cce9b..6446103ed 100644 --- a/doc/backends.txt +++ b/doc/backends.txt @@ -461,3 +461,11 @@ can then attach a GC to this thread via It is **not** safe to disable the garbage collector and enable it after the call from your background thread even if the code you are calling is short lived. + +Before the thread exits, you should tear down the thread's GC to prevent memory +leaks by calling + +.. code-block:: nim + + system.tearDownForeignThreadGc() + |