1 /* (c) Magnus Auvinen. See licence.txt in the root of the distribution for more information. */
2 /* If you are missing that file, acquire a complete release at teeworlds.com. */
3 #ifndef BASE_TL_ALLOCATOR_H
4 #define BASE_TL_ALLOCATOR_H
7 class allocator_default
10 static T
*alloc() { return new T
; }
11 static void free(T
*p
) { delete p
; }
13 static T
*alloc_array(int size
) { return new T
[size
]; }
14 static void free_array(T
*p
) { delete [] p
; }
17 #endif // TL_FILE_ALLOCATOR_HPP