# How to fix Memory Leaks?

**URL:** https://discourse.processing.org/t/how-to-fix-memory-leaks/41455
**Category:** Processing
**Created:** [March 26, 2023, 6:09pm UTC](https://discourse.processing.org/t/how-to-fix-memory-leaks/41455 "2023-03-26T18:09:32Z")
**Posts on this page:** 3
**Page:** 1

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 26, 2023, 6:09pm UTC](https://discourse.processing.org/t/how-to-fix-memory-leaks/41455/1 "2023-03-26T18:09:32Z")

</div>

I noticed my drawing software starts to very slowly fill up the ram. How can i detect unused objects and where does it come from? Can it be when increating variables? I mean if i let the software just chill and not even draw, it is increasing too. What could be the error?

---

<div class="post-metadata">

### Author: ![Aryszin](https://avatars.discourse-cdn.com/v4/letter/a/ec9cab/32.png) [@Aryszin](https://discourse.processing.org/u/Aryszin)
#### Post date: [March 26, 2023, 6:24pm UTC](https://discourse.processing.org/t/how-to-fix-memory-leaks/41455/2 "2023-03-26T18:24:11Z")

</div>

It seems to be a visual bug when i calculate the ram usage for some reason…  
nope it definitly isnt a bug!!!

---

<div class="post-metadata">

### Author: ![esc746](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/esc746/32/4258_2.png) [@esc746](https://discourse.processing.org/u/esc746)
#### Post date: [March 28, 2023, 2:02pm UTC](https://discourse.processing.org/t/how-to-fix-memory-leaks/41455/3 "2023-03-28T14:02:33Z")

</div>

How are you determining the actual memory used? Most tools do not show this. Instead they will show how much has been allocated, even if it is not in use.

(Not a topic I am expert at, but I recall this warning from software testing.)
