# Memory leak from blank sketch

**URL:** <https://discourse.processing.org/t/memory-leak-from-blank-sketch/37963>\
**Category:** Processing\
**Created:** [July 15, 2022, 7:47am UTC](https://discourse.processing.org/t/memory-leak-from-blank-sketch/37963 "2022-07-15T07:47:20Z")\
**Posts on this page:** 3\
**Page:** 1

<div class="post-metadata">

**Author:** ![ottestad](https://avatars.discourse-cdn.com/v4/letter/o/d9b06d/32.png) [@ottestad](https://discourse.processing.org/u/ottestad)\
**Post date:** [July 15, 2022, 7:47am UTC](https://discourse.processing.org/t/memory-leak-from-blank-sketch/37963/1 "2022-07-15T07:47:20Z")

</div>

I have a memory leak problem on a sketch running on a rPi, which will eventually make it crash since the program is running 24/7. Managed to recreate it on my Mac (MacBook Air M1, 2020 Monterey 12.3.1). Processing ver 4.0b8  
Found out it happens even with the empty sketch below:

```auto
void setup(){
  size(100,100);
}

void draw(){
  background(0);  
}

```

Running this, will cause Memory usage to slowly rise, at least 100Mb per hour.  
If I reduce frameRate, the memory leaks slower, so it seems to have something to do with the draw() call.

---

<div class="post-metadata">

**Author:** ![robertesler](https://avatars.discourse-cdn.com/v4/letter/r/ec9cab/32.png) [@robertesler](https://discourse.processing.org/u/robertesler)\
**Post date:** [July 15, 2022, 3:31pm UTC](https://discourse.processing.org/t/memory-leak-from-blank-sketch/37963/2 "2022-07-15T15:31:14Z")

</div>

Hi @ottestad.  
Interesting find. If you haven’t already please submit this issue on the GitHub page, [Issues · processing/processing4 · GitHub](https://github.com/processing/processing4/issues).  
It will get the proper attention there. Make sure to include how you are testing the memory leak so it can be better evaluated.  
Memory leaks in Java in my experience are rare, so there may be something else going on. Thanks for the issue.

---

<div class="post-metadata">

**Author:** ![sampottinger](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sampottinger/32/6347_2.png) [@sampottinger](https://discourse.processing.org/u/sampottinger)\
**Post date:** [February 9, 2023, 5:08pm UTC](https://discourse.processing.org/t/memory-leak-from-blank-sketch/37963/3 "2023-02-09T17:08:41Z")

</div>

Just following up on this… see [Apple Silicon memory leak? · Issue #663 · processing/processing4 · GitHub](https://github.com/processing/processing4/issues/663#issuecomment-1424524523)
