reference counting memory management
nbittich opened this issue · 0 comments
nbittich commented
- Introduce a new Primitive :
Primitive::Ref(MutPrimitive)
- instead or cloning the primitive, use the ref
- for function we still clone variables passed as parameters, but we could introduce
&v
to allow passing reference as parameters - Might be required: add
TreeNodeValue::Variable
/VariableAssign { name_assign: String, name_from_ctx: String, negate: bool }
,and refactor variable_from_ctx to evaluate the variable in compute