Making singleton use of shared_ptr... hopefully that would help
diff --git a/include/sync-ccnx-wrapper.h b/include/sync-ccnx-wrapper.h
index ad18b05..e2de36e 100644
--- a/include/sync-ccnx-wrapper.h
+++ b/include/sync-ccnx-wrapper.h
@@ -61,10 +61,10 @@
static
- CcnxWrapper *
+ boost::shared_ptr<CcnxWrapper>
Create ()
{
- static CcnxWrapper *wrapper = new CcnxWrapper ();
+ static boost::shared_ptr<CcnxWrapper> wrapper (new CcnxWrapper ());
return wrapper;
}
@@ -80,7 +80,8 @@
#else
CcnxWrapper();
#endif
-public:
+
+public:
~CcnxWrapper();
/**
diff --git a/include/sync-logic.h b/include/sync-logic.h
index 3626437..aeb39d8 100644
--- a/include/sync-logic.h
+++ b/include/sync-logic.h
@@ -175,7 +175,7 @@
std::string m_syncPrefix;
LogicUpdateCallback m_onUpdate;
LogicRemoveCallback m_onRemove;
- std::auto_ptr<CcnxWrapper> m_ccnxHandle;
+ CcnxWrapperPtr m_ccnxHandle;
Scheduler m_scheduler;