add ref-counter for Transport ABC

This commit is contained in:
Michael Davidsaver
2018-02-01 11:17:56 -08:00
parent a039b48c1f
commit 5a86835a6f
3 changed files with 20 additions and 2 deletions
+1
View File
@@ -171,6 +171,7 @@ void providerRegInit(void*)
registerRefCounter("ServerContextImpl", &ServerContextImpl::num_instances);
registerRefCounter("ServerChannel", &ServerChannel::num_instances);
registerRefCounter("Transport (ABC)", &Transport::num_instances);
registerRefCounter("BlockingTCPTransportCodec", &detail::BlockingTCPTransportCodec::num_instances);
registerRefCounter("ChannelProvider (ABC)", &ChannelProvider::num_instances);
registerRefCounter("Channel (ABC)", &Channel::num_instances);
+14
View File
@@ -58,6 +58,19 @@ struct BreakTransport : TransportSender
namespace epics {
namespace pvAccess {
size_t Transport::num_instances;
Transport::Transport()
{
REFTRACE_INCREMENT(num_instances);
}
Transport::~Transport()
{
REFTRACE_DECREMENT(num_instances);
}
namespace detail {
const std::size_t AbstractCodec::MAX_MESSAGE_PROCESS = 100;
@@ -994,6 +1007,7 @@ bool AbstractCodec::directDeserialize(ByteBuffer *existingBuffer, char* deserial
{
return false;
}
//
//
// BlockingAbstractCodec
+5 -2
View File
@@ -157,11 +157,14 @@ class SecuritySession;
/**
* Interface defining transport (connection).
*/
class Transport : public epics::pvData::DeserializableControl {
class epicsShareClass Transport : public epics::pvData::DeserializableControl {
public:
POINTER_DEFINITIONS(Transport);
virtual ~Transport() {}
static size_t num_instances;
Transport();
virtual ~Transport();
/**
* Acquires transport.