From d09232f31394e485d0d9d65b8ee3bc97a683e3ec Mon Sep 17 00:00:00 2001 From: Ronan Abhamon Date: Thu, 14 Sep 2017 15:30:54 +0200 Subject: [PATCH] fix(PropertyContainer): create correctly private data --- src/object/property-container.cpp | 8 +++++++- src/object/property-container.h | 4 ++-- 2 files changed, 9 insertions(+), 3 deletions(-) diff --git a/src/object/property-container.cpp b/src/object/property-container.cpp index 0cbc8f712..fadc32082 100644 --- a/src/object/property-container.cpp +++ b/src/object/property-container.cpp @@ -33,10 +33,16 @@ public: // ----------------------------------------------------------------------------- +PropertyContainer::PropertyContainer () : mPrivate(new PropertyContainerPrivate) {} + // Empty copy constructor. Don't change this pattern. // PropertyContainer is an Entity component, not a simple structure. // An Entity is UNIQUE. -PropertyContainer::PropertyContainer (const PropertyContainer &) {} +PropertyContainer::PropertyContainer (const PropertyContainer &) : mPrivate(new PropertyContainerPrivate) {} + +PropertyContainer::~PropertyContainer () { + delete mPrivate; +} PropertyContainer &PropertyContainer::operator= (const PropertyContainer &) { return *this; diff --git a/src/object/property-container.h b/src/object/property-container.h index c8cf7724d..67dab6034 100644 --- a/src/object/property-container.h +++ b/src/object/property-container.h @@ -33,9 +33,9 @@ class PropertyContainerPrivate; class LINPHONE_PUBLIC PropertyContainer { public: - PropertyContainer () = default; + PropertyContainer (); PropertyContainer (const PropertyContainer &src); - virtual ~PropertyContainer () = default; + virtual ~PropertyContainer (); PropertyContainer &operator= (const PropertyContainer &src);