You signed in with another tab or window. Reload to refresh your session.You signed out in another tab or window. Reload to refresh your session.You switched accounts on another tab or window. Reload to refresh your session.Dismiss alert
Currently we use a reference counting system for garbage collecting. I think it is specially efficient with the current architecture because we only need to manage the objects and lists, avoiding the worse part of the draw back of incrementing and decrementing the counter too often.
But there is still a problem to concern, namely the reference counting mechanism can not delete structures if they have cyclic reference among them, because it implies that each of them will always have ate least 1 reference, and thus can never be safely delocated.
We should think about how to fix it. I bet JavaScript uses reference counting since our engine seems to be very similar to theirs, and they have for sure found a solution. Another language I know uses reference counting is Python, and we could probably learn something from them as well.
The text was updated successfully, but these errors were encountered:
Update: JavaScript uses mark & sweep, and Python uses Reference Counting + Mark & Sweep specialized for data cycles.
So we will need to implement a mark & sweep garbage collector at some point. Maybe we could use Python approach or at least leave this choice up to the user of the library.
Currently we use a reference counting system for garbage collecting. I think it is specially efficient with the current architecture because we only need to manage the objects and lists, avoiding the worse part of the draw back of incrementing and decrementing the counter too often.
But there is still a problem to concern, namely the reference counting mechanism can not delete structures if they have cyclic reference among them, because it implies that each of them will always have ate least 1 reference, and thus can never be safely delocated.
We should think about how to fix it. I bet JavaScript uses reference counting since our engine seems to be very similar to theirs, and they have for sure found a solution. Another language I know uses reference counting is Python, and we could probably learn something from them as well.
The text was updated successfully, but these errors were encountered: