Hi,
I just took a look at your program, real nice! I like it a lot.
The deleteobject was not freeing the surfaces and rasterizers properly. So yes there was a major memory leak (4 megs every run).
I just realized deleteobject wouldn't work like I thought. So I had to create a bunch of freexxxxxxx routines.
FreeSurface(Handle, [...]);
FreeRasterizer(Handle, [...]);
Just replace the deleteobject functions you have with these two functions, make sure you don't mix up rasterizers and surfaces though.