Problem: Delete texture doesn't affect RAM

I have a simple question. I mentioned that OpenGL affects only the GPU when deleting textures. But is it possible to free RAM when deleting textures?

textures aren’t in RAM so what memory are you aiming to free? The only RAM involved is when you load the data from a file in readiness to be uploaded to the GPU. After loading this data you can let the GC remove the object (assuming all handles to the objects are no longer in any scope)

In general, allocating a texture should only allocate VRAM. No RAM is used. The exception is if you have an integrated Intel GPU, in which case the GPU has no VRAM and uses a portion of system RAM instead. However, I’m pretty sure this portion is reserved, meaning that the RAM that the GPU has reserved can’t be used by the CPU even if you free it (although I may be wrong). TL;DR: Don’t worry about it.

The problem was I had a bug in my code. The performance of my computer was worse after a while. I already fixed the problem. Now I have a better performance than before the bug appeared. :wink: