A build issue is seemingly causing a crash for the Android API
implementation, so the constructors/destructors were all placed
in the .h file. This commit adds a comment explaining that to the
OCRepresentation code.
Change-Id: I22d0e2a374ea82165d0d7914ebfd2748b5f59c60
Signed-off-by: Erich Keane <erich.keane@intel.com>
Reviewed-on: https://gerrit.iotivity.org/gerrit/318
Tested-by: jenkins-iotivity <jenkins-iotivity@opendaylight.org>
Reviewed-by: Patrick Lankswert <patrick.lankswert@intel.com>
class OCRepresentation
{
public:
+ // Note: Implementation of all constructors and destructors
+ // are all placed in the same location due to a crash that
+ // was observed in Android, where merely constructing/destructing
+ // an OCRepresentation object was enough to cause an invalid 'free'.
+ // It is believed that this is a result of incompatible compiler
+ // options between the gradle JNI and armeabi scons build, however
+ // this fix will work in the meantime.
OCRepresentation(): m_interfaceType(InterfaceType::None){}
OCRepresentation(OCRepresentation&&) = default;