Well, you really dont want to leak all of those though, so perhaps push
them to a separate queue too (i.e. Just a queue of the stuff that is newed,
that you go through at the end to clean up?

Den 2.9.2013 kl. 00:12 skrev tobiatesan <notifications@github.com>:

In engines/wintermute/base/gfx/osystem/dirty_rect_container.cpp:

> +			// a Commodore-logo type of deal (where the C is the bigger rect)
> +			// So intersecting is either the NE, SE, SW or NW corner of candidate
> +			if (intersecting.width() >= kMaxSplicingX &&
> +			        intersecting.height() >= kMaxSplicingY
> +			   ) {
> +				if (intersecting.top >= candidate->top &&
> +				        intersecting.left >= candidate->left &&
> +				        intersecting.bottom == candidate->bottom &&
> +				        intersecting.right == candidate->right
> +				   ) { // SE case
> +					Common::Rect *neslice = new Common::Rect(*candidate);
> +					neslice->bottom = intersecting.top;
> +					neslice->left = intersecting.left;
> +					assert(neslice->isValidRect());
> +					if (neslice->width() != 0 && neslice->height() != 0) {
> +						queue.insert_at(queue.size(), neslice);

Or not, since I would get rid of some useful ones too (they are pointers
after all).

—
Reply to this email directly or view it on
GitHub<https://github.com/somaen/scummvm/pull/8/files#r6103559>
.