xref: /haiku/src/servers/app/RegionPool.h (revision 39c9925fcf718dbb8c8d5342997d6bbd40f9e7e4)
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 
14 class BRegion;
15 
16 #define DEBUG_LEAK 0
17 
18 class 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