Dali::Vector release data more safe (Dali::Vector::Replace) 87/266687/6
authorEunki, Hong <eunkiki.hong@samsung.com>
Wed, 17 Nov 2021 07:44:38 +0000 (16:44 +0900)
committerEunki, Hong <eunkiki.hong@samsung.com>
Mon, 22 Nov 2021 05:53:04 +0000 (14:53 +0900)
commit400b6546a691ededb240b7e5d302d2af6ef1956e
treec39cd2c33abf970c217bdf5e9b5532cc55c528cf
parent6f665cb9000d615619f3e9256657d5dbebf7de3c
Dali::Vector release data more safe (Dali::Vector::Replace)

We got some issue when someone use mData
during Dali::Vector is on reserving.

In this case, mData = nullptr (or mData memory is deleted.) very short time.

Now, we add VectorBase::Replace(void* newData) function.
It mean, VectorBase::mData will be replaced as newData.

It can block thread integrity issue.

Note : VectorBase::Copy can have nullptr between Release() <-> Reserve()
There is no way to fix it without any additional memory.
So just keep current implement logic.

Change-Id: Ie09b1bc00146f4c3be9294853a32c093b3597fba
Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
dali/public-api/common/dali-vector.cpp
dali/public-api/common/dali-vector.h