[Applications.Common] Increment the reference counter on SafeHandle instances (#4691)
authorhjhun <36876573+hjhun@users.noreply.github.com>
Mon, 31 Oct 2022 02:13:39 +0000 (11:13 +0900)
committerGitHub <noreply@github.com>
Mon, 31 Oct 2022 02:13:39 +0000 (11:13 +0900)
commit61dfbd4a33d7c42bb0523718b701cd1375b1b4c1
tree0094212b255cee4e1ac3ca88db5f7398abfc6b15
parent29b72742bc5b023bcb9f27fdd3566fed0b413ffc
[Applications.Common] Increment the reference counter on SafeHandle instances (#4691)

* 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