PistonDevelopers / PistonDevelopers/piston
Memory leak?
Open
Nobody has claimed this yet.
discussion
- Dominant language
- Rust
- Stars
- 4.7k
- Forks
- 235
- Avg merge
- 1m
- Merged PRs (30d)
- 4
Description
Running the homepage example with cargo run on macOSX (last stable version of rust):
extern crate piston_window;
use piston_window::*;
fn main() {
let mut window: PistonWindow =
WindowSettings::new("Hello Piston!", [640, 480])
.exit_on_esc(true).build().unwrap();
while let Some(e) = window.next() {
window.draw_2d(&e, |c, g| {
clear([1.0; 4], g);
rectangle([1.0, 0.0, 0.0, 1.0], // red
[0.0, 0.0, 100.0, 100.0],
c.transform, g);
});
}
}
Memory consumption starts to 17 MB and slowly increases while the program runs. Is it normal?
Contributor guide
First steps
- Read the whole issue, then the project's contributing guide.
- Comment on the issue to say you are picking it up — it saves two people doing the same work.
- Fork the repository and make your change on a branch.
- Open a pull request that references the issue number.
Research direction
Start with the supplied Rust homepage example and reproduce the reported memory growth on macOS while monitoring usage. Done means determining whether the increase is expected; if not, identify the affected component and provide a focused reproduction or fix.
Written by the indexing model from the issue text.
Assessment
- Tech stack
- rust
- Domain
- performance
- Issue type
- Bug
- Difficulty
- 4/5
- Estimated time
- 3-5 days
- Activity status
- Stale
- Clarity
- Needs clarification
- Newbie friendliness
- 30/100