[NUI] Remove strong references of text components regarding events
authorJiyun Yang <ji.yang@samsung.com>
Tue, 8 Aug 2023 10:27:07 +0000 (19:27 +0900)
committerJiyun Yang <ji.yang@samsung.com>
Wed, 9 Aug 2023 08:08:12 +0000 (17:08 +0900)
commit186580170d4ea306876fe8300a59ee08b64b84aa
tree90e0d338a5cda11641cf06094c5c75cc85612c5a
parenteaf9427b66257bbaf8d9182544ee0b25504808b6
[NUI] Remove strong references of text components regarding events

* Improve WeakEvent
  * Lazy list initialization
  * Provide count changed callback methods
  * Seperate file into WeakEvent and WeakEventProxy
* Fix TextLabel, TextField, TextEditor
  * Do not register event handler to the system event directly.
  * Instead they use WeakEventProxy to get GCed without Dispose call.

Signed-off-by: Jiyun Yang <ji.yang@samsung.com>
src/Tizen.NUI/src/internal/Common/WeakEvent.cs
src/Tizen.NUI/src/internal/Common/WeakEventProxy.cs [new file with mode: 0644]
src/Tizen.NUI/src/public/BaseComponents/TextEditor.cs
src/Tizen.NUI/src/public/BaseComponents/TextField.cs
src/Tizen.NUI/src/public/BaseComponents/TextLabel.cs