[4.0] Fix memory leak in InputMethodOptions
[platform/core/uifw/dali-adaptor.git] / adaptors / devel-api / adaptor-framework / input-method-options.cpp
index b2d0b00..6b1401c 100644 (file)
@@ -47,7 +47,13 @@ struct InputMethodOptions::Impl
 
 InputMethodOptions::InputMethodOptions()
 {
-  mImpl = new Impl( );
+  mImpl.reset(new Impl());
+}
+
+InputMethodOptions::~InputMethodOptions()
+{
+  // destructor cannot be inlined and must be in a unit
+  // for unique_ptr to work with forward declaration
 }
 
 bool InputMethodOptions::IsPassword()