-
-
Notifications
You must be signed in to change notification settings - Fork 1.5k
New issue
Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.
By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.
Already on GitHub? Sign in to your account
Memory leak with arc gc #14568
Labels
Comments
I'm not sure if |
import os
var testSeq: seq[int]
proc Update() =
testSeq = @[]
testSeq.add(0)
proc main =
while true:
Update()
sleep(1)
main() Ah nvm, seems like a real leak, with valgrind (
|
Workaround - use |
I think the "isFirstWrite" analysis is wrong for global variables, ping @Clyybber |
Clyybber
added a commit
to Clyybber/Nim
that referenced
this issue
Jun 6, 2020
Clyybber
added a commit
to Clyybber/Nim
that referenced
this issue
Jun 7, 2020
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
The occupied memory logged out for the following sample grows apparently indefinitely.
Example
Current Output
Additional Information
As noted in the code sample using the seq before clearing it keeps the occupied memory constant as expected.
Compiled with
nim c --gc:arc memtest.nim
The text was updated successfully, but these errors were encountered: