@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
olonho
05/17/2017, 6:08 AM
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
uli
05/17/2017, 6:51 PM
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
olonho
05/17/2017, 7:06 PM
I would say, that unregistration shall take place once listener no longer relevant for an object (i.e. when application/dialog is destroyed)
u
uli
05/17/2017, 8:07 PM
I am not convinced yet. But thanks any way.
k
kropp
05/18/2017, 8:27 AM
@uli I don't have answer right now, need to investigate and prototype first