msink / kotlin-libui

Kotlin/Native interop to libui: a portable GUI library
MIT License
650 stars 50 forks source link

Control.dispose() is never called #10

Open andreas-mausch opened 5 years ago

andreas-mausch commented 5 years ago

Hi, me again. :)

I've noticed the dispose() method is never called for me in the examples. I've tried hello-ktx and controlgallery, OS is Manjaro (4.19 Kernel).

The callback from uiOnShouldQuit is never reached.

Even when I dispose the mainWindow manually, I would have expected all children's dispose() method to be called - which was not the case!

I'm not sure if I missed something, or maybe it's a bug?

Andreas

msink commented 5 years ago

Yes, dispose() is not called when container class disposes children - it calls free(). More precisely - libiu calls ctl.pointed.Destroy, and it calls free().

About uiOnShouldQuit() not called - I don't know, maybe bug somewhere.