Added comment to the OCRepresentation fix
authorErich Keane <erich.keane@intel.com>
Mon, 9 Feb 2015 17:59:48 +0000 (09:59 -0800)
committerPatrick Lankswert <patrick.lankswert@intel.com>
Mon, 9 Feb 2015 20:49:55 +0000 (20:49 +0000)
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>
resource/include/OCRepresentation.h

index 506722e..144628c 100644 (file)
@@ -98,6 +98,13 @@ namespace OC
     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;