in order to realese the memory allocated for renderer in the constructor I'm calling delete in the destructor like this:

Rectangle::~Rectangle( ) {

delete renderer;

}

But, for some reason, the memory allocated for renderer is still not being released. When I look the windows task manager the ram memory consumed by my program keeps increasing more and more. I know for a fact that the Rectangle constructor is the cause for this memory leak because when I comment the lines for the objects instantiation in draw the memory consumed by my program gets stable as it should. Can somebody tell me what might be going on?