[Applications.Common] Increment the reference counter on SafeHandle instances (#4693)
authorhjhun <36876573+hjhun@users.noreply.github.com>
Mon, 31 Oct 2022 02:13:48 +0000 (11:13 +0900)
committerGitHub <noreply@github.com>
Mon, 31 Oct 2022 02:13:48 +0000 (11:13 +0900)
commitc82db4df0cf36f307b4345c9ef4dca516502e870
treeed5d56adcaa6ae09a7ea9bfad963e02e1abfcc1f
parent90801c563dc6c37e50a25db0644749edff304e50
[Applications.Common] Increment the reference counter on SafeHandle instances (#4693)

* Increment the reference counter on SafeHandle instances.

To prevent the common language runtime from reclaiming memory used by
a handle, this patch adds calling DangerousAddRef() before calling
DangerousGetHandle().

Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
* Modify implementation of using SafeHandle

Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
* Remove unnecesary blank line

Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
Signed-off-by: Hwankyu Jhun <h.jhun@samsung.com>
src/Tizen.Applications.Common/Tizen.Applications.RPCPort/Parcel.cs
src/Tizen.Applications.Common/Tizen.Applications/AppControl.cs
src/Tizen.Applications.Common/Tizen.Applications/Bundle.cs