Skip to content

Commit

Permalink
nimsuggest: no need to enable orc before collection
Browse files Browse the repository at this point in the history
The cycle collector runs upon GC_fullCollect(), as such there is no need to enable them.

However running the collector would enable ORC, so we still have to disable it afterwards
  • Loading branch information
alaviss authored Jan 20, 2024
1 parent 8b18590 commit eab018c
Showing 1 changed file with 0 additions and 2 deletions.
2 changes: 0 additions & 2 deletions nimsuggest/nimsuggest.nim
Original file line number Diff line number Diff line change
Expand Up @@ -211,8 +211,6 @@ proc runGc() =
## Runs a GC collection pass. This procedure will also collect any cycles assuming ORC is in use.
##
## When nimsuggest is being used as a library, no GC mode change will be performed.
when isMainModule and defined(gcOrc):
GC_enableOrc()
GC_fullCollect()
when isMainModule and defined(gcOrc):
GC_disableOrc()
Expand Down

0 comments on commit eab018c

Please sign in to comment.