# Organising a Large A-V Performance Sketch - Should I make Classes? Memory Management

**URL:** <https://discourse.processing.org/t/organising-a-large-a-v-performance-sketch-should-i-make-classes-memory-management/39943>\
**Category:** Libraries\
**Created:** [November 30, 2022, 1:34pm UTC](https://discourse.processing.org/t/organising-a-large-a-v-performance-sketch-should-i-make-classes-memory-management/39943 "2022-11-30T13:34:11Z")\
**Posts on this page:** 1\
**Showing post:** 2

<div class="post-metadata">

**Author:** ![sableraph](https://yyz2.discourse-cdn.com/flex036/user_avatar/discourse.processing.org/sableraph/32/251_2.png) [@sableraph](https://discourse.processing.org/u/sableraph)\
**Post date:** [November 30, 2022, 4:11pm UTC](https://discourse.processing.org/t/organising-a-large-a-v-performance-sketch-should-i-make-classes-memory-management/39943/2 "2022-11-30T16:11:03Z")

</div>

Hi @JonnieNightTime 🙂

> [@JonnieNightTime](#):
>
> Should I make a “Bank” Class?

> [@JonnieNightTime](#):
>
> Should I make a “Pattern” Class?

I’m not an expert but it seems to make sense to structure your code that way. I feel there might be more behind your question though. Why are you asking if you should use classes?

For your question about memory, this might be helpful:

> [@Optimizing for memory with images](https://discourse.processing.org/t/optimizing-for-memory-with-images/25772/9):
>
> Hi, I can clearly see that it’s starting to make sense! Indeed it’s exactly what I (and others, @micycle @noel ) were suggesting. wink Note that the garbage collector is not instantly releasing a previous overwritten PImage. It’s up to the JVM (Java virtual machine, running the bytecode produced by the Java compiler) to decide when to free the previous image. Anyway it’s going to greatly reduce memory usage! I found those useful StackOverflow links about garbage collector and how to dea…

---

_[View the full topic](https://discourse.processing.org/t/organising-a-large-a-v-performance-sketch-should-i-make-classes-memory-management/39943)._
