1/*
2 * Copyright (c) 2006, Haiku, Inc.
3 * Distributed under the terms of the MIT license.
4 *
5 * Authors:
6 *		Stephan A��mus <superstippi@gmx.de>
7 */
8
9#ifndef REGION_POOL_H
10#define REGION_POOL_H
11
12#include <List.h>
13
14class BRegion;
15
16#define DEBUG_LEAK 0
17
18class RegionPool {
19 public:
20								RegionPool();
21	virtual						~RegionPool();
22
23			BRegion*			GetRegion();
24			BRegion*			GetRegion(const BRegion& other);
25			void				Recycle(BRegion* region);
26
27 private:
28			BList				fAvailable;
29#if DEBUG_LEAK
30			BList				fUsed;
31#endif
32};
33
34#endif // REGION_POOL_H
35