deprecate dispose()

bad practice
This commit is contained in:
Michael Davidsaver
2017-06-20 20:30:37 +02:00
parent e7c6b83c43
commit 46137f96bb
3 changed files with 10 additions and 3 deletions

View File

@@ -93,7 +93,7 @@ public:
* Dispose (destroy) server context.
* This calls <code>destroy()</code> and silently handles all exceptions.
*/
virtual void dispose() = 0;
virtual void dispose() EPICS_DEPRECATED = 0;
virtual ChannelSearchManager::shared_pointer getChannelSearchManager() = 0;

View File

@@ -69,7 +69,7 @@ public:
*/
virtual void printInfo(std::ostream& str) = 0;
void dispose();
void dispose() EPICS_DEPRECATED;
virtual epicsTimeStamp& getStartTime() = 0;

View File

@@ -55,7 +55,14 @@ ServerContextImpl::ServerContextImpl():
ServerContextImpl::~ServerContextImpl()
{
dispose();
try
{
shutdown();
}
catch(std::exception& e)
{
std::cerr<<"Error in: ServerContextImpl::dispose: "<<e.what()<<"\n";
}
}
const GUID& ServerContextImpl::getGUID()