Mercurial > dwindows
comparison mac/dw.m @ 1559:bc3a11fe9a46
Don't use _dw_pool_drain() in dw_exit() on Mac... that drains and recreates the pool.
Just drain the pool during exit.
Also switched to using dw_exit() and dw_main_quit() in dwtest.
author | bsmith@81767d24-ef19-dc11-ae90-00e081727c95 |
---|---|
date | Tue, 17 Jan 2012 16:10:47 +0000 |
parents | 9c5d3ac5bec5 |
children | d84a690448c3 |
comparison
equal
deleted
inserted
replaced
1558:9c5d3ac5bec5 | 1559:bc3a11fe9a46 |
---|---|
1 /* | 1 /* |
2 * Dynamic Windows: | 2 * Dynamic Windows: |
3 * A GTK like implementation of the MacOS GUI using Cocoa | 3 * A GTK like implementation of the MacOS GUI using Cocoa |
4 * | 4 * |
5 * (C) 2012 Brian Smith <brian@dbsoft.org> | 5 * (C) 2011-2012 Brian Smith <brian@dbsoft.org> |
6 * (C) 2011 Mark Hessling <mark@rexx.org> | 6 * (C) 2011 Mark Hessling <mark@rexx.org> |
7 * | 7 * |
8 * Requires 10.5 or later. | 8 * Requires 10.5 or later. |
9 * clang -std=c99 -g -o dwtest -D__MAC__ -I. dwtest.c mac/dw.m -framework Cocoa -framework WebKit | 9 * clang -std=c99 -g -o dwtest -D__MAC__ -I. dwtest.c mac/dw.m -framework Cocoa -framework WebKit |
10 */ | 10 */ |
2920 * Parameters: | 2920 * Parameters: |
2921 * exitcode: Exit code reported to the operating system. | 2921 * exitcode: Exit code reported to the operating system. |
2922 */ | 2922 */ |
2923 void API dw_exit(int exitcode) | 2923 void API dw_exit(int exitcode) |
2924 { | 2924 { |
2925 _dw_pool_drain(); | 2925 #if !defined(GARBAGE_COLLECT) |
2926 pool = pthread_getspecific(_dw_pool_key); | |
2927 [pool drain]; | |
2928 #endif | |
2926 exit(exitcode); | 2929 exit(exitcode); |
2927 } | 2930 } |
2928 | 2931 |
2929 /* | 2932 /* |
2930 * Free's memory allocated by dynamic windows. | 2933 * Free's memory allocated by dynamic windows. |