In some situations I get the error message "cannot be captured as it would violate memory safety". I understand that this means nim is trying to stop me shooting myself in the foot, but is there anywhere I can read an explanation and if it is possible to do what I want without triggering this error?
The variable is sent as a var to a proc where it works fine. But I then in that proc I pass it to another proc and in that one I get the error. I've also tried passing it to the other proc without var (since in that data is only read) but get the same error. Is there an alternative to var that would work?