Skip to content

Commit

Permalink
Prototype: Correct LRC tracking for prototypes
Browse files Browse the repository at this point in the history
  • Loading branch information
xFrednet committed Oct 22, 2024
1 parent 6339dc5 commit 9b25e03
Show file tree
Hide file tree
Showing 2 changed files with 4 additions and 2 deletions.
5 changes: 4 additions & 1 deletion src/rt/objects/dyn_object.h
Original file line number Diff line number Diff line change
Expand Up @@ -183,7 +183,10 @@ namespace rt::objects
}

if (prototype != nullptr)
prototype->change_rc(1);
{
// prototype->change_rc(1);
add_reference(this, prototype);
}
std::cout << "Allocate: " << this << std::endl;
}

Expand Down
1 change: 0 additions & 1 deletion tests/recursive_list.vpy
Original file line number Diff line number Diff line change
Expand Up @@ -37,7 +37,6 @@ region list
value = "x"

# Dyrona doesn't freeze shared objects automatically (yet)
# There is currently a bug, where the LRC gets incorrect, if "[String]" isn't frozen
proto = value["__proto__"]
freeze proto
drop proto
Expand Down

0 comments on commit 9b25e03

Please sign in to comment.