Hello! There is a Bitmap *bm , and the task of my program is to constantly copy arbitrary (but within the limits of the bitmap) areas of this bitmap, and draw them
Bitmap *bm=0; void Create() { if(bm) delete bm; bm=new Bitmap(...); //рисуем в битмап, здесь всё нормально Draw(); } void Draw(HDC hdc) { Graphics g(hdc); g.DrawImage(bm->Clone(...),...); //клонируем, рисуем //потом снова вызываем эту функцию, и снова } The problem is that during the call to this function, the memory used by my program is constantly increasing, this is a memory leak, right?
In all forums, sites they write that GDI + objects are released themselves, but something is not noticeable. Maybe the error is not in this? What is there to do?