Skip to content

Commit

Permalink
remove mention of GC_ref and GC_unref for strings
Browse files Browse the repository at this point in the history
  • Loading branch information
ringabout authored Mar 6, 2024
1 parent a2584c7 commit 3ca9f7d
Showing 1 changed file with 1 addition and 5 deletions.
6 changes: 1 addition & 5 deletions doc/backends.md
Original file line number Diff line number Diff line change
Expand Up @@ -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:
Expand Down

0 comments on commit 3ca9f7d

Please sign in to comment.