Changeset 20232
- Timestamp:
- 05/21/07 14:25:59 (2 years ago)
- Files:
Legend:
- Unmodified
- Added
- Removed
- Modified
- Copied
- Moved
juggler/trunk/modules/vapor/vpr/IO/BlockIO.cpp
r19846 r20232 122 122 BlockIO::~BlockIO() 123 123 { 124 /* Do nothing. */ ; 124 if (NULL != mStatsStrategy) 125 { 126 delete mStatsStrategy; 127 } 125 128 } 126 129 juggler/trunk/modules/vapor/vpr/IO/BlockIO.h
r19846 r20232 500 500 void setIOStatStrategy(vpr::BaseIOStatsStrategy* strat) 501 501 { 502 if (NULL != mStatsStrategy) 503 { 504 delete mStatsStrategy; 505 } 502 506 mStatsStrategy = strat; 503 507 if(mStatsStrategy != NULL) // If we have a non-NULL strategy juggler/trunk/modules/vapor/vpr/md/POSIX/IO/Socket/SocketStreamImplBSD.cpp
r19729 r20232 72 72 : SocketImplBSD(sock.mLocalAddr, sock.mRemoteAddr, SocketTypes::STREAM) 73 73 { 74 // mHandle is created in the base class constructor. Since we are creating 75 // a copy we must clean up existing memory. 76 if (NULL != mHandle) 77 { 78 delete mHandle; 79 mHandle = NULL; 80 } 81 74 82 mHandle = new FileHandleImplUNIX(sock.mHandle->getName()); 75 83 mHandle->mFdesc = sock.mHandle->mFdesc; … … 135 143 { 136 144 sock.setRemoteAddr(addr); 145 146 // Clean up the existing handle. 147 if (NULL != sock.mHandle) 148 { 149 delete sock.mHandle; 150 sock.mHandle = NULL; 151 } 137 152 sock.mHandle = new FileHandleImplUNIX(addr.getAddressString()); 138 153 sock.mHandle->mFdesc = accept_sock;
