Change-Id: I31814a6c720154bdbd2eebeb20c9b3204af89940
Signed-off-by: coderhyme <jhyo.kim@samsung.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/1307
Reviewed-by: Uze Choi <uzchoi@samsung.com>
Tested-by: Uze Choi <uzchoi@samsung.com>
PrimitiveServerResource& operator=(PrimitiveServerResource&&) = delete;
PrimitiveServerResource& operator=(const PrimitiveServerResource&) = delete;
+ ~PrimitiveServerResource();
+
template< typename T >
void setAttribute(const std::string& key, const T &value)
{
return server;
}
+
+ PrimitiveServerResource::~PrimitiveServerResource()
+ {
+ if (m_resourceHandle)
+ {
+ try
+ {
+ OC::OCPlatform::unregisterResource(m_resourceHandle);
+ }
+ catch (...)
+ {
+ }
+ }
+ }
+
bool PrimitiveServerResource::hasAttribute(const std::string& key) const
{
WeakGuard lock(*this);