clarify what is leaked even more

Open Beginner friendly
#369 0 comments 0 reactions 0 assignees View on GitHub

Nobody has claimed this yet.

Assessment

Difficulty
1/5
Estimated time
Under an hour
Newbie friendliness
72/100
Issue type
Documentation
Clarity
Clearly specified
Activity status
Stale
Tech stack
rust
Domain
documentation

Research direction

Start with src/leaking.md and read the paragraph containing “all that does is leak even more.” Clarify what additional data or state is leaked in the example, including the relationship to mem::forget(drainer), then verify that the revised wording resolves the question without changing the technical meaning.

Written by the indexing model from the issue text.

Description

it says below in https://github.com/rust-lang/nomicon/blob/master/src/leaking.md

all that does is leak even more (and possibly leave the Vec in an unexpected but otherwise consistent state).

As I understand, the remaining items in vec is leaked due to mem::forget(drainer), What is leaked even more in the example?

Dominant language
CSS
Stars
2.3k
Forks
325
PR merge metrics
No merged PRs in 30d

Contributor guide

No contributing guide indexed for this repository

First steps

  1. Read the whole issue, then the project's contributing guide.
  2. Comment on the issue to say you are picking it up — it saves two people doing the same work.
  3. Fork the repository and make your change on a branch.
  4. Open a pull request that references the issue number.

More from rust-lang/nomicon

All issues in rust-lang/nomicon

Similar issues

More Documentation issues

Get new issues in your inbox

A short digest of beginner-friendly GitHub issues.