placement new issues

This commit is contained in:
Jeff Hill
2002-04-25 18:26:33 +00:00
parent f670103a0c
commit 8334b8d261
4 changed files with 111 additions and 54 deletions

View File

@@ -10,6 +10,8 @@
* Author: Jeff Hill
*/
#include <stdexcept>
#define epicsAssertAuthor "Jeff Hill johill@lanl.gov"
#include "iocinf.h"
@@ -63,5 +65,26 @@ void netWriteNotifyIO::completion ( unsigned /* type */,
this->chan.getClient().printf ( "Write response with data ?\n" );
}
// NOTE: The constructor for netWriteNotifyIO::netWriteNotifyIO() currently does
// not throw an exception, but we should eventually have placement delete
// defined for class netWriteNotifyIO when compilers support this so that
// there is no possibility of a leak if there was an exception in
// a future version of netWriteNotifyIO::netWriteNotifyIO()
#if defined ( NETIO_PLACEMENT_DELETE )
void netWriteNotifyIO::operator delete ( void *pCadaver,
tsFreeList < class netWriteNotifyIO, 1024, epicsMutexNOOP > &freeList )
{
freeList.release ( pCadaver, sizeof ( netWriteNotifyIO ) );
}
#endif
# if defined (_MSC_VER) && _MSC_VER == 1300
void netWriteNotifyIO::operator delete ( void * ) // avoid visual c++ 7 bug
{
throw std::logic_error ( "_MSC_VER == 1300 bogus stub called?" );
}
# endif