Just a tip: it's probably best to remove commented lines from your sample code before posting to avoid confusion.
I don't see anything that would be a leak, per se. You are creating autoreleased objects, so those may be sticking around for a bit. Is Leaks saying that you have a leak, or are you merely investigating and observing that the images still exist longer than you expect?
When in doubt, avoid autoreleased objects. Ex:
Code:
NSString *fileName = [[NSString alloc] initWithFormat:@"girl%d_%d", gCategory, rand];
UIImage *img = [[UIImage alloc] initWithContentsOfFile: [[NSBundle mainBundle] pathForResource:fileName ofType:@"jpg"]];
[bgImage setImage:img];
[img release], img = nil;
[fileName release], filename = nil;
I don't think that Leaks will report autoreleased items as "leaks", so if you are getting the little leak spike in your graph, then the issue is probably somewhere else.