# createFont() – how to forcefully remove unused fonts from memory?

**URL:** https://discourse.processing.org/t/createfont-how-to-forcefully-remove-unused-fonts-from-memory/37237
**Category:** Coding Questions
**Created:** [May 30, 2022, 7:24pm UTC](https://discourse.processing.org/t/createfont-how-to-forcefully-remove-unused-fonts-from-memory/37237 "2022-05-30T19:24:35Z")
**Posts on this page:** 1
**Showing post:** 7

<div class="post-metadata">

### Author: ![glv](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/glv/32/18785_2.png) [@glv](https://discourse.processing.org/u/glv)
#### Post date: [May 30, 2022, 11:11pm UTC](https://discourse.processing.org/t/createfont-how-to-forcefully-remove-unused-fonts-from-memory/37237/7 "2022-05-30T23:11:19Z")

</div>

Hello @disuye,

I tried your code and it is stable for 151 fonts with Processing 4.0b8 and W10 Pro.

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/f/d/fd2960d8149940dea337e15d3a7722f0315edc43.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/6/a/6adf05ca33b3b19d24f64ee17556734d4a966c5d.png)

 ![image](https://canada1.discourse-cdn.com/flex036/uploads/processingfoundation1/original/3X/a/8/a87ed06b6d14e0e2c8696a5d86b339b19363a260.png)

Software used:  
[https://visualvm.github.io/index.html](https://visualvm.github.io/index.html)

My experience with System.gc():  
[https://discourse.processing.org/t/pimage-garbage-not-being-properly-collected/12252/4](https://discourse.processing.org/t/pimage-garbage-not-being-properly-collected/12252/4)  
[https://discourse.processing.org/t/insufficient-memory-for-java-sketch-on-raspberrypi/12331/2](https://discourse.processing.org/t/insufficient-memory-for-java-sketch-on-raspberrypi/12331/2)

`:)`

---

_[View the full topic](https://discourse.processing.org/t/createfont-how-to-forcefully-remove-unused-fonts-from-memory/37237)._
