[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:09:57 +0000 (11:09 +0900)
committerGitHub <noreply@github.com>
Wed, 5 Feb 2020 02:09:57 +0000 (11:09 +0900)
commitb2e2c0fbe838dd5343111e1a4ee27ae34d4844df
tree1945b6e16d615618ce8c0ed89dfe0b310435be7e
parent8a5da77a12b434c399112b01391bf975b85392a9
[NUI] Fix Animation Dispose() to make local variable of Animation instance make working properly (#1360)

- 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