[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)
committerdongsug-song <35130733+dongsug-song@users.noreply.github.com>
Wed, 16 Aug 2023 12:04:45 +0000 (21:04 +0900)
commita388cbf32c533c6675ab9302720f05944543c3ab
treef2fa427506c068ec93c71c89e10d531e8dbd9993
parent145d2ee99a47dfcfc2b264c8f825829391ef2cba
[NUI] Remove strong references of text components regarding events

* Improve WeakEvent
  * Lazy list initialization
  * Provide count changed callback methods
  * Separate 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