[NUI] Fix Animation Dispose() to make local variable of Animation instance make worki...
authordongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 5 Feb 2020 02:10:24 +0000 (11:10 +0900)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 02:10:24 +0000 (11:10 +0900)
commitbc2acb0ff9cd21905e43cfc2262a33936aa4265c
treea5ed11eaa032c7dbd1ab615cef0029c53f357f78
parentd6567bb32c06e2fd78611783c9a5067281804e0f
[NUI] Fix Animation Dispose() to make local variable of Animation instance make working properly (#1361)

- NUI Animation class is binding to DALi native Animation class.
- Animation class inherits from BaseHandle class so it has a reference count.
- In NUI side, if the Animation class is instanced in local scope, it is disposed automatically by DisposeQueue. Here the reference count of native DALi Animation is decreased and it will be managed by smart pointer so this is not a matter in NUI side.
- NUI Animation Dispose() need care only the events which are connected to native DALi, so event handlers of Finished and ProgressReached are certainly disconnected.
- Animation which has been created as local variable will work properly. (ex: if LoopCount is set to 100 and it is even local variable, it will animate 100 times and stop normally.)
src/Tizen.NUI/src/public/Animation.cs