Re: [AD] Two Windows patches

[ Thread Index | Date Index | More lists.liballeg.org/allegro-developers Archives ]


On Sunday 22 January 2006 22:42, Peter Wang wrote:
> The 4.2.x branch is supposed to be stable, but I don't see any way
> around it.

We could do a beta test where a number of people stress-test the release?

> I don't like this fix much.  The free's correspond to mallocs which are
> performed "one level up" in src/graphics.c, and it duplicates code.

I know. The alternative is to check if the bitmap is a subbitmap in 
destroy_bitmap() and not call destroy_system_bitmap() if it is, but that 
introduces an assumption on how subbitmaps of system bitmaps behave in the 
general-purpose code, which I think is a bad idea from an object oriented 
design point of view (destroy_system_bitmap() knows what to do about 
system bitmaps and it should handle subbitmaps of them).

Ideally, there would be a way to return a status to destroy_bitmap() to 
tell it that it should go ahead and do what it normally would have done. 
ie,

destroy_bitmap: `Hey, destroy_system_bitmap, you destroy this bitmap!'
destroy_system_bitmap: `Nah, you do it.'
destroy_bitmap: `Ok.'

Maybe this is actually a better idea, I'll see if I can do it this way 
instead.

Evert




Mail converted by MHonArc 2.6.19+ http://listengine.tuxfamily.org/