Cyclic Dependencies #3
William-Weston
started this conversation in
General
Replies: 0 comments
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Uh oh!
There was an error while loading. Please reload this page.
-
Greetings and salutations. First, thank-you for making your code available. I'm also trying to implement the jlox tree-walk interpreter in C++ but I'm having some problems. Based upon a cursory examination of your code, I can't tell if you dealt with this issue but I figured I might as well ask.
How did you deal with the cyclic dependencies between the environment and a lox function? The environment holds the function but the function also holds a
shared_ptrto the environment. I'm not a professional developer so I'm not sure how to deal with this problem. I end up with memory leaks. Thank-you.Beta Was this translation helpful? Give feedback.
All reactions