#ifndef TAO_BUFFER_ALLOCATOR_T_CPP #define TAO_BUFFER_ALLOCATOR_T_CPP #include "tao/Buffer_Allocator_T.h" #include "ace/Global_Macros.h" TAO_BEGIN_VERSIONED_NAMESPACE_DECL namespace TAO { template TAO_Buffer_Allocator::TAO_Buffer_Allocator (alloc_type *allocator) : allocator_(allocator) { } template handler_type* TAO_Buffer_Allocator::allocate () { handler_type* myvalue = 0; ACE_NEW_MALLOC_RETURN (myvalue, static_cast ( allocator_->malloc (sizeof (handler_type))), handler_type (), 0); return myvalue; } template void TAO_Buffer_Allocator::release (handler_type *ptr) { ACE_DES_FREE (ptr, allocator_->free, handler_type); } } TAO_END_VERSIONED_NAMESPACE_DECL #endif /* TAO_BUFFER_ALLOCATOR_T_CPP */