Remove current and future memory leaks with messages by forcing the use of OwnerPoint...
[platform/core/uifw/dali-core.git] / dali / internal / update / animation / scene-graph-constraint-base.cpp
index 19b0373..9a692dd 100644 (file)
@@ -1,5 +1,5 @@
 /*
- * Copyright (c) 2014 Samsung Electronics Co., Ltd.
+ * Copyright (c) 2017 Samsung Electronics Co., Ltd.
  *
  * Licensed under the Apache License, Version 2.0 (the "License");
  * you may not use this file except in compliance with the License.
@@ -18,9 +18,6 @@
 // CLASS HEADER
 #include <dali/internal/update/animation/scene-graph-constraint.h>
 
-// INTERNAL INCLUDES
-#include <dali/public-api/animation/active-constraint.h>
-
 namespace Dali
 {
 
@@ -35,9 +32,8 @@ namespace SceneGraph
   unsigned int ConstraintBase::mTotalInstanceCount   = 0;
 #endif
 
-ConstraintBase::ConstraintBase( PropertyOwnerSet& ownerSet )
-: mWeight( Dali::ActiveConstraint::DEFAULT_WEIGHT ),
-  mRemoveAction( Dali::Constraint::DEFAULT_REMOVE_ACTION ),
+ConstraintBase::ConstraintBase( PropertyOwnerContainer& ownerSet, RemoveAction removeAction )
+: mRemoveAction( removeAction ),
   mFirstApply( true ),
   mDisconnected( true ),
   mObservedOwners( ownerSet )
@@ -57,15 +53,11 @@ ConstraintBase::~ConstraintBase()
 
 #ifdef DEBUG_ENABLED
   --mCurrentInstanceCount;
-#ifndef EMSCRIPTEN
-  memset ( &mWeight, 0xFA, sizeof(mWeight) ); // Fill with garbage pattern to help detect invalid memory access
-#endif
 #endif
 }
 
 void ConstraintBase::ResetDefaultProperties( BufferIndex updateBufferIndex )
 {
-  // Not used, since the weight property is reset by PropertyOwner
   DALI_ASSERT_DEBUG( false );
 }