[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>