Skip to content

Garbage collector cycle problem #34

Description

@VinGarcia

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.

Activity

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Metadata

Metadata

Assignees

Labels

Type

No type

Projects

No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions