[vlc-devel] PATCH: OS X remove the use of setjmp()/longjmp()
cmdrclueless at gmail.com
Sat Dec 26 21:55:58 CET 2009
When you talk about sending '-(id) terminate:(id)sender' are you
referring to the NIB file? The code change would not work without
modifying the NIB file that was in
If you see the change there I modified the selector to invoke stop
instead of terminate. Is that what you are asking? It's the only
'terminate' call in the NIB so I believe I got them all. Based upon
the debugging trace log the behavior of the application at termination
is the same from the menu as from the dock.
In addition to the NIB modification the code now has to directly
invoke the delegate's '-(void)
applicationWillTerminate:(NSNotification *)aNotification' to perform
the cleanup of the OS X framework.
On Sat, Dec 26, 2009 at 11:16 AM, Pierre d'Herbemont
<pdherbemont at free.fr> wrote:
> On Sat, Dec 26, 2009 at 4:52 PM, Brian Weaver <cmdrclueless at gmail.com> wrote:
>> It should if it did before; from a logical perspective it works the
>> same as before. Previously the code was using setjmp()/longjmp() to
>> return control back to the caller of NSApp run(). By invoking the
>> 'stop' selector instead of 'quit' the Cocoa framework will return
>> control after processing the stop event. It accomplishes the same end
>> result, but avoid any potential side effects from using jump routines
>> in a managed run time environment.
> Sure, but when you select the Quit menu from the Dock it sends a -(id)
> terminate:, so you'll need to send a -stop from here. Or so I believe,
> that was the question asked :-)
>> I'm mainly concerned with Objective-C 2.0 which allows for automatic
>> garbage collection.
> We don't support Garbage Collection nor Objective-C 2.0 there, so it's
> no big deal :-) The overhead to support garbage collection without
> leaking is too important to be considered for a near future.
>> Also, I believe the use of 'stop' is easier to
>> understand than the use of the setjmp() / longjmp().
> It is!
> vlc-devel mailing list
> To unsubscribe or modify your subscription options:
/* insert witty comment here */
More information about the vlc-devel