PocketMatrix forums

A read-only archive of the PocketMatrix forums (2001–2014). Posting and accounts are closed.

Deleting Rasterizer

I've been tracking down a memory leak, and it seems that it was from my use of SetRenderTarget().

The way I've been using it is just simply making one and using it - and not deleting it...

i.e.
Code:

Rasterizer * ir = display->CreateRasterizer(img);
ir.Blit(...)
//no delete here...


This is used several time per frame in my game and I was loosing 100's of K per second. I didn't think that there was anything to delete, but I tried using "Delete ir" after it's use and the leak went away. Is this something new since we moved to PFrog 0.8?

I searched for info on this, and I never saw anyone else's code deleting the rasterizer - so maybe I'm wrong and something else is causing the leak.
You indeed need to delete the rasterizer when you are done using it. This is nothing new.