replace destroy by RAII; many implementation changes
This commit is contained in:
@@ -51,25 +51,26 @@ PvaClientMultiPutDouble::PvaClientMultiPutDouble(
|
||||
isPutConnected(false),
|
||||
isDestroyed(false)
|
||||
{
|
||||
if(PvaClient::getDebug()) cout<< "PvaClientMultiPutDouble::PvaClientMultiPutDouble()\n";
|
||||
}
|
||||
|
||||
|
||||
|
||||
PvaClientMultiPutDouble::~PvaClientMultiPutDouble()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
void PvaClientMultiPutDouble::destroy()
|
||||
{
|
||||
if(PvaClient::getDebug()) cout<< "PvaClientMultiPutDouble::~PvaClientMultiPutDouble()\n";
|
||||
{
|
||||
Lock xx(mutex);
|
||||
if(isDestroyed) return;
|
||||
if(isDestroyed) {
|
||||
cerr<< "Why was PvaClientMultiPutDouble::~PvaClientMultiPutDouble() called more then once????\n";
|
||||
return;
|
||||
}
|
||||
isDestroyed = true;
|
||||
}
|
||||
pvaClientChannelArray.clear();
|
||||
}
|
||||
|
||||
|
||||
void PvaClientMultiPutDouble::connect()
|
||||
{
|
||||
shared_vector<epics::pvData::boolean> isConnected = pvaClientMultiChannel->getIsConnected();
|
||||
|
||||
Reference in New Issue
Block a user