Mercurial > dwindows
diff mac/dw.m @ 1861:c836603d3f14
Add dw_shutdown() function which does the same thing as dw_exit() ...
except it doesn't actually end the process. Useful for bindings
that are expecting to do their own cleanup after the script exits.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Fri, 01 Mar 2013 16:51:08 +0000 |
parents | 4790589f52a9 |
children | 9c7485b1921c |
line wrap: on
line diff
--- a/mac/dw.m Fri Mar 01 13:01:59 2013 +0000 +++ b/mac/dw.m Fri Mar 01 16:51:08 2013 +0000 @@ -3216,15 +3216,23 @@ /* * Cleanly terminates a DW session, should be signal handler safe. - * Parameters: - * exitcode: Exit code reported to the operating system. - */ -void API dw_exit(int exitcode) + */ +void API dw_shutdown(void) { #if !defined(GARBAGE_COLLECT) pool = pthread_getspecific(_dw_pool_key); [pool drain]; #endif +} + +/* + * Cleanly terminates a DW session, should be signal handler safe. + * Parameters: + * exitcode: Exit code reported to the operating system. + */ +void API dw_exit(int exitcode) +{ + dw_shutdown(); exit(exitcode); } @@ -8299,7 +8307,8 @@ [window setDelegate:view]; [window setAutorecalculatesKeyViewLoop:YES]; [window setAcceptsMouseMovedEvents:YES]; - [view release]; + [window setReleasedWhenClosed:YES]; + [view autorelease]; /* Enable full screen mode on resizeable windows */ if(flStyle & DW_FCF_SIZEBORDER)