diff options
author | ringabout <43030857+ringabout@users.noreply.github.com> | 2024-03-07 04:24:55 +0800 |
---|---|---|
committer | GitHub <noreply@github.com> | 2024-03-06 21:24:55 +0100 |
commit | c2d2b6344d5fbbb802d59f3066b6b71ad09fa68a (patch) | |
tree | 71dc13e79db7675637d4523f4bf3fc3f5502f28a /doc | |
parent | a2584c779b0debb54cdd0111f9ad845fbfe33e97 (diff) | |
download | Nim-c2d2b6344d5fbbb802d59f3066b6b71ad09fa68a.tar.gz |
remove mention of `GC_ref` and `GC_unref` for strings (#23373)
Diffstat (limited to 'doc')
-rw-r--r-- | doc/backends.md | 6 |
1 files changed, 1 insertions, 5 deletions
diff --git a/doc/backends.md b/doc/backends.md index 996ffd2f9..9f0c54835 100644 --- a/doc/backends.md +++ b/doc/backends.md @@ -373,11 +373,7 @@ The manual mentions that [Nim strings are implicitly convertible to cstrings](manual.html#types-cstring-type) which makes interaction usually painless. Most C functions accepting a Nim string converted to a `cstring` will likely not need to keep this string around and by the time -they return the string won't be needed anymore. However, for the rare cases -where a Nim string has to be preserved and made available to the C backend -as a `cstring`, you will need to manually prevent the string data -from being freed with [GC_ref](system.html#GC_ref,string) and [GC_unref]( -system.html#GC_unref,string). +they return the string won't be needed anymore. A similar thing happens with C code invoking Nim code which returns a `cstring`. Consider the following proc: |