memory management
This commit is contained in:
@@ -82,6 +82,11 @@ void ServerChannelImpl::destroy()
|
||||
_channel->destroy();
|
||||
}
|
||||
|
||||
ServerChannelImpl::~ServerChannelImpl()
|
||||
{
|
||||
destroy();
|
||||
}
|
||||
|
||||
void ServerChannelImpl::printInfo()
|
||||
{
|
||||
printInfo(stdout);
|
||||
|
||||
@@ -29,7 +29,7 @@ public:
|
||||
/*
|
||||
* Destructor.
|
||||
*/
|
||||
virtual ~ServerChannelImpl() {};
|
||||
virtual ~ServerChannelImpl();
|
||||
|
||||
/**
|
||||
* Get local channel.
|
||||
|
||||
@@ -54,6 +54,7 @@ ServerContextImpl::shared_pointer ServerContextImpl::create()
|
||||
|
||||
ServerContextImpl::~ServerContextImpl()
|
||||
{
|
||||
dispose();
|
||||
}
|
||||
|
||||
const Version& ServerContextImpl::getVersion()
|
||||
@@ -529,19 +530,19 @@ TransportRegistry::shared_pointer ServerContextImpl::getTransportRegistry()
|
||||
|
||||
Channel::shared_pointer ServerContextImpl::getChannel(pvAccessID id)
|
||||
{
|
||||
//TODO, not used
|
||||
// not used
|
||||
return Channel::shared_pointer();
|
||||
}
|
||||
|
||||
Transport::shared_pointer ServerContextImpl::getSearchTransport()
|
||||
{
|
||||
//TODO, not used
|
||||
// not used
|
||||
return Transport::shared_pointer();
|
||||
}
|
||||
|
||||
void ServerContextImpl::beaconAnomalyNotify()
|
||||
{
|
||||
// noop
|
||||
// not used
|
||||
}
|
||||
|
||||
|
||||
|
||||
@@ -67,6 +67,7 @@ namespace epics {
|
||||
|
||||
//additional whitespaces after four bytes
|
||||
pad += (delta_bytes/4);
|
||||
pad++;
|
||||
|
||||
for(int i = 0; i<pad; i++)
|
||||
chars.insert(0, " ");
|
||||
|
||||
@@ -31,8 +31,7 @@ class MockChannelProcess :
|
||||
{
|
||||
PVDATA_REFCOUNT_MONITOR_CONSTRUCT(mockChannelProcess);
|
||||
|
||||
// TODO wrong
|
||||
ChannelProcess::shared_pointer thisPtr = static_pointer_cast<ChannelProcess>(shared_from_this());
|
||||
ChannelProcess::shared_pointer thisPtr; // we return null = static_pointer_cast<ChannelProcess>(shared_from_this());
|
||||
PVField* field = pvStructure->getSubField(String("value"));
|
||||
if (field == 0)
|
||||
{
|
||||
@@ -47,7 +46,7 @@ class MockChannelProcess :
|
||||
{
|
||||
Status notAScalarStatus(Status::STATUSTYPE_ERROR, "'value' field not scalar type");
|
||||
m_channelProcessRequester->channelProcessConnect(notAScalarStatus, thisPtr);
|
||||
// NOTE client must destroy this instance….
|
||||
// NOTE client must destroy this instance...
|
||||
// do not access any fields and return ASAP
|
||||
return;
|
||||
}
|
||||
@@ -1099,7 +1098,7 @@ void testServer()
|
||||
|
||||
ctx->printInfo();
|
||||
|
||||
ctx->run(10);
|
||||
ctx->run(100);
|
||||
|
||||
ctx->destroy();
|
||||
|
||||
|
||||
Reference in New Issue
Block a user