I am using an ofFbo inside a class which I need to create and delete objects from. My problem is that calling myFbo.allocate() uses a bit of memory, but I cannot find a way of releasing that memory once I’ve finished with the FBO. Can anyone point me in the right direction?
Storing the fbo in a vector still doesn’t seem to release the memory once the vector is cleared. Maybe I misunderstood but this is what I did to test that:
Allocating them up front might work but it means that I cannot delete the object which holds the fbo, so I have to reuse them without reallocating them. I would rather find a way of being able to create and delete the object at will as each fbo might need to be a different size.
Is there no way to simply release the memory that the fbo has taken up by allocating it?
Correct me, if I am wrong, but doing anything different from changing some variables state inside all “events” called functions, is not a good idea, because they are not executed on the main thread. May be that’s your problem.
I’m wondering if there’s a way to deallocate an fbo now, as I’m running into the same problem that I need to constantly reallocate an fbo instance in order to change it’s size. I’m using it as an offscreen buffer, and throughout runtime images of different sizes need to be rendered onto it.
I’m having the same problems - using an fbo in a class to export an image when the class is created, but each time a new object is created from the class the memory creeps up and up to very high levels making the app slow down. If I remove the fbo stuff it’s all fine. I’ve tried putting the fbo in a vector and clearing it but seems to have no effect.
Hi. I can see this thread is very old, but it might be worth resurrecting it.
I have seen this same issue.
I have a class that might discard an fbo once it is done using it. But the memory never gets deallocated. Over time, the memory piles up.
Has anyone found a proper way to free the memory allocated with ofFbo.allocate?