Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

[REDESIGN] GC for objects instead of variables #13

Closed
mu001999 opened this issue Sep 2, 2020 · 1 comment · Fixed by #16
Closed

[REDESIGN] GC for objects instead of variables #13

mu001999 opened this issue Sep 2, 2020 · 1 comment · Fixed by #16
Labels

Comments

@mu001999
Copy link
Collaborator

mu001999 commented Sep 2, 2020

Current solution of GC is to collect variables, but many temporary variables will be created when pushing something into Context. And each variable may contain a shared_ptr to one object, so the object won't be released until the variable is released.

So another plan is to collect objects instead of variables and use shared_ptr of variables, then variables could be released in real time. And objects would be released when GC.

Something different is that variables and objects will be released at the same time in the former one, but in the latter variables could be released before objects.

@mu001999
Copy link
Collaborator Author

TODO: Design the binded systerm to make sure each object could be collected

@mu001999 mu001999 linked a pull request Sep 11, 2020 that will close this issue
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
Projects
None yet
Development

Successfully merging a pull request may close this issue.

1 participant