diff --git a/src/ca/hostNameCache.cpp b/src/ca/hostNameCache.cpp index 03ddab443..f4e6dfac6 100644 --- a/src/ca/hostNameCache.cpp +++ b/src/ca/hostNameCache.cpp @@ -30,8 +30,6 @@ #include "iocinf.h" #include "hostNameCache.h" -epicsSingleton < tsFreeList < hostNameCache, 16 > > hostNameCache::pFreeList; - hostNameCache::hostNameCache ( const osiSockAddr &addr, ipAddrToAsciiEngine &engine ) : ipAddrToAsciiAsynchronous ( addr ), ioComplete ( false ) @@ -68,12 +66,3 @@ void hostNameCache::hostName ( char *pBuf, unsigned bufSize ) const } } -void * hostNameCache::operator new ( size_t size ) -{ - return hostNameCache::pFreeList->allocate ( size ); -} - -void hostNameCache::operator delete ( void *pCadaver, size_t size ) -{ - hostNameCache::pFreeList->release ( pCadaver, size ); -} diff --git a/src/ca/hostNameCache.h b/src/ca/hostNameCache.h index fa17415a1..b29def436 100644 --- a/src/ca/hostNameCache.h +++ b/src/ca/hostNameCache.h @@ -27,9 +27,17 @@ #ifndef hostNameCacheh #define hostNameCacheh +#ifdef epicsExportSharedSymbols +# define hostNameCache_epicsExportSharedSymbols +# undef epicsExportSharedSymbols +#endif + #include "ipAddrToAsciiAsynchronous.h" #include "tsFreeList.h" -#include "epicsSingleton.h" + +#ifdef hostNameCache_epicsExportSharedSymbols +# define epicsExportSharedSymbols +#endif class hostNameCache : public ipAddrToAsciiAsynchronous { public: @@ -38,12 +46,9 @@ public: void destroy (); void ioCompletionNotify ( const char *pHostName ); void hostName ( char *pBuf, unsigned bufLength ) const; - void * operator new ( size_t size ); - void operator delete ( void *pCadaver, size_t size ); private: bool ioComplete; char hostNameBuf [128]; - static epicsSingleton < tsFreeList < class hostNameCache, 16 > > pFreeList; }; #endif // #ifndef hostNameCacheh