So I have code that looks like this:
    
    
    let myobj = objectFactory() # returns ref object
    myseq = @[myobj]
    
    
    Run

When checking the containing method with expandArc I see that `nimMarkCyclic` 
is called on the variable. This object is moved to another thread and the ORC 
code crashes after a destructor is called. Sorry if that's just noise but 
that's the high level context.

I changed the code to use var instead of let and then called move when adding 
to the sequence and that removes the `nimMarkCyclic` call. I'm just wondering 
why this is marked "cyclic" because it seems to me that it's just 2 references 
to something not something referencing itself. I'm wondering if this is the 
intended behavior and I'm just not understanding how the memory management 
works or if there is possibly a bug.

This is actually not my code. It's here: 
<https://github.com/Vindaar/ginger/blob/master/src/ginger.nim#L1850-L1861>

Reply via email to