ObjFW  Check-in [fc200bb14a]

Overview
Comment:Release the OFApplication delegate in the atexit handler.
Downloads: Tarball | ZIP archive | SQL archive
Timelines: family | ancestors | descendants | both | trunk
Files: files | file ages | folders
SHA3-256: fc200bb14a19e73e91c768b18375583437109180646b281d403e9be13568e76d
User & Date: js on 2011-10-28 18:32:09
Other Links: manifest | tags
Context
2011-10-28
21:30
Parse struct tm ourselves. check-in: 4fc7884fb1 user: js tags: trunk
18:32
Release the OFApplication delegate in the atexit handler. check-in: fc200bb14a user: js tags: trunk
18:02
Add a test for -[OFString enumerateLinesUsingBlock:]. check-in: db5cdde5db user: js tags: trunk
Changes

Modified src/OFApplication.m from [741469d176] to [449f37093f].

38
39
40
41
42
43
44


45


46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64
65
66
67
68
69
#endif

static OFApplication *app = nil;

static void
atexit_handler(void)
{


	[[app delegate] applicationWillTerminate];


}

int
of_application_main(int *argc, char **argv[], Class cls)
{
	OFApplication *app = [OFApplication sharedApplication];
	id <OFApplicationDelegate> delegate = [[cls alloc] init];

	[app setArgumentCount: argc
	    andArgumentValues: argv];

	[app setDelegate: delegate];

	[app run];

	[(id)delegate release];

	return 0;
}

@implementation OFApplication
+ sharedApplication
{
	if (app == nil)







>
>
|
>
>















<
<







38
39
40
41
42
43
44
45
46
47
48
49
50
51
52
53
54
55
56
57
58
59
60
61
62
63
64


65
66
67
68
69
70
71
#endif

static OFApplication *app = nil;

static void
atexit_handler(void)
{
	id <OFApplicationDelegate> delegate = [app delegate];

	[delegate applicationWillTerminate];

	[(id)delegate release];
}

int
of_application_main(int *argc, char **argv[], Class cls)
{
	OFApplication *app = [OFApplication sharedApplication];
	id <OFApplicationDelegate> delegate = [[cls alloc] init];

	[app setArgumentCount: argc
	    andArgumentValues: argv];

	[app setDelegate: delegate];

	[app run];



	return 0;
}

@implementation OFApplication
+ sharedApplication
{
	if (app == nil)