Add `tearDownForeignThreadGc` function (#5369)
This commit is contained in:
parent
279e4b0451
commit
6fa1dba515
5 changed files with 132 additions and 10 deletions
|
|
@ -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()
|
||||
|
||||
|
|
|
|||
Loading…
Add table
Add a link
Reference in a new issue