From deedb6eadbb5590bbb809f12b3414efec2091878 Mon Sep 17 00:00:00 2001 From: Matej Sekoranja Date: Tue, 8 Nov 2011 15:36:07 +0100 Subject: [PATCH] static Event vs. CDRNode destruction fixed --- testApp/remote/testChannelConnect.cpp | 11 ++++++----- 1 file changed, 6 insertions(+), 5 deletions(-) diff --git a/testApp/remote/testChannelConnect.cpp b/testApp/remote/testChannelConnect.cpp index 074e4e2..d171705 100644 --- a/testApp/remote/testChannelConnect.cpp +++ b/testApp/remote/testChannelConnect.cpp @@ -16,16 +16,15 @@ using namespace epics::pvData; using namespace epics::pvAccess; using namespace std; -#define N_CHANNELS 10000 - -static Event g_event; +#define N_CHANNELS 1000 class ChannelRequesterImpl : public ChannelRequester { public: - ChannelRequesterImpl() : count(0) {} + ChannelRequesterImpl(Event& event) : count(0), g_event(event) {} private: int count; + Event& g_event; virtual String getRequesterName() { @@ -71,9 +70,11 @@ private: int main(int argc,char *argv[]) { { + Event g_event; + ClientFactory::start(); ChannelProvider::shared_pointer provider = getChannelAccess()->getProvider("pvAccess"); - ChannelRequester::shared_pointer channelRequester(new ChannelRequesterImpl()); + ChannelRequester::shared_pointer channelRequester(new ChannelRequesterImpl(g_event)); Channel::shared_pointer channels[N_CHANNELS]; char buf[16];