Should ApplicationCommandLine in on addOnCommandLine be Scoped #142
I'm writing a program using GTKApplication where I need the command line arguments to be passed from the local to primary instance. To do this, I added the flag ApplicationFlags.HANDLES_COMMAND_LINE to my application and implemented attached a handler to addOnCommandLine. It all worked fine except the local instance would just hang and never return.
After doing some investigation and a nudge on IRC from the GTK developers, looking at the documentation for ApplicationCommandLine I see that the local instance will not return unless the ApplicationCommandLine is released. The solution to my issue was pretty easy, just destroy the ApplicationCommandLine when exiting the AddOnCommandLineHandler.
However, I was wondering if the delegate should be changed to make this parameter scoped like was done for the Cairo Context in onDraw?
The text was updated successfully, but these errors were encountered: