memory management

This commit is contained in:
Matej Sekoranja
2011-05-15 21:41:05 +02:00
parent 776c4cf449
commit 9c1eda3655
5 changed files with 14 additions and 8 deletions
+5
View File
@@ -82,6 +82,11 @@ void ServerChannelImpl::destroy()
_channel->destroy();
}
ServerChannelImpl::~ServerChannelImpl()
{
destroy();
}
void ServerChannelImpl::printInfo()
{
printInfo(stdout);
+1 -1
View File
@@ -29,7 +29,7 @@ public:
/*
* Destructor.
*/
virtual ~ServerChannelImpl() {};
virtual ~ServerChannelImpl();
/**
* Get local channel.
+4 -3
View File
@@ -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
}
+1
View File
@@ -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, " ");
+3 -4
View File
@@ -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();