Join GitHub today
GitHub is home to over 28 million developers working together to host and review code, manage projects, and build software together.Sign up
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?