<@U0BB18DK2> thanks for your reply. When would the...
# kotlin-native
u
@kropp thanks for your reply. When would the unregistering be done? There are no c++like destructors in KN. Or did i just miss them?
o
uli: same approach as in function memScoped() could be used. Whenever certain scope is exited - cleanup handlers will be executed. Object lifetime-based resource accounting is usually flawed design, so we intentionally do not provide finalizers to objects.
u
Did you take note of the example i was commenting on? Within the proxy object there is a listener proxy that gets registered at object creation time. This needs to be unregistered at some point. Do you see a solution for that case? Or do you consider it bad design?
o
I would say, that unregistration shall take place once listener no longer relevant for an object (i.e. when application/dialog is destroyed)
u
I am not convinced yet. But thanks any way.
k
@uli I don't have answer right now, need to investigate and prototype first
u
I guess that's fine at this time
Thanks every one for their work