2 Copyright © 1995-2001, The AROS Development Team. All rights reserved.
5 Desc: Graphics function DisposeRegion()
8 #include <aros/debug.h>
9 #include "graphics_intern.h"
10 #include <proto/exec.h>
11 #include <proto/graphics.h>
12 #include <graphics/regions.h>
13 #include "intregions.h"
15 /*****************************************************************************
18 #include <clib/graphics_protos.h>
20 AROS_LH1(void, DisposeRegion
,
23 AROS_LHA(struct Region
*, region
, A0
),
26 struct GfxBase
*, GfxBase
, 89, Graphics
)
29 Frees all memory allocated by this region, including its
33 region - pointer to a Region structure
50 27-11-96 digulla automatically created from
51 graphics_lib.fd and clib/graphics_protos.h
52 15-01-97 mreckt initial version
54 *****************************************************************************/
58 ASSERT_VALID_PTR(region
);
62 #if REGIONS_USE_MEMPOOL
63 ObtainSemaphore(&PrivGBase(GfxBase
)->regionsem
);
64 FreePooled(PrivGBase(GfxBase
)->regionpool
, region
, sizeof(struct Region
));
65 ReleaseSemaphore(&PrivGBase(GfxBase
)->regionsem
);
67 FreeMem(region
, sizeof(struct Region
));