ToshioCP / Gtk4-tutorial

GTK 4 tutorial for beginners
https://toshiocp.github.io/Gtk4-tutorial/
548 stars 50 forks source link

Do we need to clean up the pointer in the function app_activate in Section 4? #42

Closed goluckyryan closed 1 year ago

goluckyryan commented 1 year ago

Hi Toshio-San,

In Section 4 [https://github.com/ToshioCP/Gtk4-tutorial/blob/main/gfm/sec4.md]

In the app_activate function, there are 2 pointers win and lab. Do we need to delete it at the end of the program? or GTK will handle that?

Also, why the function is static void but not just void?

Thank you very much.

Best regards, Ryan

goluckyryan commented 1 year ago

oh... I probably don't sleep well. there is no new, no need to delete. the scope of pointer only in the function.