[NUI] Remove potential of memory leak
authorEunki, Hong <eunkiki.hong@samsung.com>
Thu, 7 Apr 2022 12:22:27 +0000 (21:22 +0900)
committerJaehyun Cho <jaehyun0cho@gmail.com>
Wed, 20 Apr 2022 08:38:08 +0000 (17:38 +0900)
commit4ce45bd9d8f54c286bf1bf55db0cdf38334ce192
treecd62b60462f02ae8a439dc2af114d41f1481c34b
parent40db07a0faba9d656ab712146b2d24316a081645
[NUI] Remove potential of memory leak

Some Interop API required Delete pairwisely.
This is cause IntPtr have same role as Native size's BaseHandle.
It mean, they increase Native side reference count of BaseObject,
and should decrease the reference by delete it self.
But that IntPtr created in c++ side, so also should delete in c++ side.

Registry.cs use IntPtr as Key so, some API us it as wrong way.
If someone find matched value in Registry, it is just one of BaseHandle.
inputed IntPtr required to delete but some API didn't delete it!

This patch find that case, and make them remove well.

Signed-off-by: Eunki, Hong <eunkiki.hong@samsung.com>
src/Tizen.NUI/src/public/Common/PropertyNotification.cs
src/Tizen.NUI/src/public/Window/Window.cs