fixed incorrect mention of garbage collection in quiz explanation #248
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.
In the quiz explanation ch19-01-unsafe-rust.toml, the last question mentions that the appropriate workaround for returning a pointer to a stack-allocated variable is to use garbage collection, specifically by returning an Rc. This is misleading as Rust does not have garbage collection built into the language. Rc is a reference-counted smart pointer which manages memory through reference counting and not garbage collection. Referring to it as garbage collection can cause confusion, especially for learners who are trying to figure out the differences between Rust and garbage collected languages such as Java or Python.
Suggested Fix:
Replace the reference to garbage collection with reference counting to accurately reflect Rust's memory management model.