1 // ANNA - Anna is Not Nothingness Anymore //
3 // (c) Copyright 2005-2015 Eduardo Ramos Testillano & Francisco Ruiz Rayo //
5 // See project site at http://redmine.teslayout.com/projects/anna-suite //
6 // See accompanying file LICENSE or copy at http://www.teslayout.com/projects/public/anna.LICENSE //
9 #ifndef anna_core_Allocator_hpp
10 #define anna_core_Allocator_hpp
15 \param T Clase asociada a este ubicador. Debe tener un constructor vacio.
19 template <typename T> class Allocator {
22 Creacion de una instancia de tipo T.
23 \return Una nueva instancia del tipo T.
25 static T* create() throw() { return new T; }
28 Libera los recursos asociados a la instancia recibida como parametro.
29 \param t Instancia que vamos a liberar.
31 static void destroy(T* t) throw() { delete t; }