(c++) Why is my memory footprint growing?
===

the following example makes use of the openFrameworks toolkit, but I guess my error is not openFrameworks specific so I hope someone can help.

I use ofxThreadedImageLoader to dynamically load images. And I use another thread to unload/delete. I have condensed my problem into a little piece of code. I don't need the delete-thread in this example but I do need it in my real program, so that's why it's in here. (Also if I delete in the main loop instead of the thread, I don't get the problem. With the thread it's like the images are getting copied somewhere and only one copy gets deleted.)

    void testApp::setup(){	
    alreadyLoaded = false;
    tmpImage = new ofImage();
    
    loader.loadFromDisk(tmpImage, "images/test.png");
    loader.startThread(true, false);
    imageDeleter.start();
    
    }


    void testApp::update(){
    bool alreadyLoaded = tmpImage->isUsingTexture();
    
    if(alreadyLoaded) {
        ofTexture& tex = tmpImage->getTextureReference();
        alreadyLoaded = tex.bAllocated();
    }
    
    if(alreadyLoaded) { 
        imageDeleter.addImageToDelete(tmpImage);

        tmpImage = new ofImage();
        int nImages = DIR.listDir("images/");
        
        loader.loadFromDisk(tmpImage, DIR.getPath((int) ofRandom(nImages)));
    }
    }

Update is the programs main loop. Here's the threaded delete:

    class threadedDelete : public ofxThread{
    
    public:
    deque<ofImage *> images_to_delete;
    
    //--------------------------
    threadedDelete() {
        
    }
    
    
    threadedDelete(ofImage*  _imageToDelete){
        lock();
        images_to_delete.push_back(_imageToDelete);
        unlock();
    }
    
    
    void addImageToDelete(ofImage*  _imageToDelete) {
        lock();
        images_to_delete.push_back(_imageToDelete);
        unlock();
    }
    
    void start(){
        startThread(true, false);   // blocking, verbose
    }
    
    void stop(){
        stopThread();
    }
    
    //--------------------------
    void threadedFunction(){
        while(isThreadRunning()){
            if (images_to_delete.size() > 0) {
                lock();

                ofImage  * imageToDelete(images_to_delete.front());
                ofLog(OF_LOG_NOTICE, "deleting " + ofToString(imageToDelete)); 
                images_to_delete.pop_front();
                delete imageToDelete;

                unlock();
            }
            else {
                ofSleepMillis(50);
            }
        }
    }
    
    };

So basically I'm just loading a random image and when it's loaded, I delete it and load another one. Even though every new ofImage gets deleted, my memory footprint grows until I get a memory warning (iOS) and my app crashes. What do I miss?
As I said I know the code is using openFrameworks classes but I guess my error is pretty basic so someone might be able to see it based on this snippet.