Implement null collector for lifetime branded GC#89
Merged
Conversation
nekevss
approved these changes
Jun 18, 2026
nekevss
left a comment
Member
There was a problem hiding this comment.
At a high level, I think this is fine and we can move forward with it. I did leave one non-blocking comment that should ideally be addressed in quick follow up PR at some point in the future.
| _cx: &crate::collectors::null_collector_branded::MutationContext<'id, 'gc>, | ||
| ) -> Option<Gc<'gc, T>> { | ||
| // In the null collector, everything stays alive until context drops. | ||
| Some(Gc { |
Member
There was a problem hiding this comment.
nit(non-blocking): one point that applies here and elsewhere in the branded code
We should really have some proper constructors rather than relying on struct expressions. What should the name of that ctor be? Probably up for debate. We could call it with_pointer or just new.
Either way, this should really be returning something like:
Some(Gc::with_pointer(self.ptr))It conveys a little bit better.
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
No description provided.