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.
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.