Cocoa | Resolving Memory Leaks in NSThread

Hi,
I’ve got another question relative to Cocoa/Objective-C, this time about memory management.

I have a loop to make a PDFDocument from a series of NSImages. While the loop is in progress my application (PDFMaker) displays a panel attached to the main window with only a progress bar. Every time the loop completes processing an image, the progress bar gets updated.

Due to the progress bar does not update when you set a new value in the same loop as the one that processes the images, I thought of making a subclass of NSThread for processing the images. This subclass then notifies its delegate when an image was finished processing.

The use of this subclass generated a massive memory leak, and I can’t figure out what I have done wrong.

NSThread Subclass

Implementation of Creator and Delegate of the thread (only a part of)

Hope the great coders can help me,
ief2