mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Patches submitted from May 20 to Aug 28 1997
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@2406 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
7b12c4af23
commit
a57d791f91
119 changed files with 16409 additions and 1698 deletions
|
@ -12,6 +12,12 @@ int main()
|
|||
{
|
||||
id set;
|
||||
id arp;
|
||||
id arc;
|
||||
id una;
|
||||
id xxx;
|
||||
id apl;
|
||||
|
||||
[NSAutoreleasePool enableDoubleReleaseCheck:YES];
|
||||
|
||||
arp = [[NSAutoreleasePool alloc] init];
|
||||
|
||||
|
@ -27,6 +33,20 @@ int main()
|
|||
printf("%s\n", [o cStringNoCopy]);
|
||||
}
|
||||
|
||||
apl = [[NSAutoreleasePool alloc] init];
|
||||
arc = [[NSArchiver new] autorelease];
|
||||
printf("%u\n", [arc retainCount]);
|
||||
[arc retain];
|
||||
printf("%u\n", [arc retainCount]);
|
||||
[arc release];
|
||||
printf("%u\n", [arc retainCount]);
|
||||
[arc encodeRootObject: set];
|
||||
/* Intentionally dodgy code - autorelease before init to see if init copes. */
|
||||
una = [[[NSUnarchiver alloc] autorelease] initForReadingWithData: [arc archiverData]];
|
||||
xxx = [una decodeObject];
|
||||
[xxx release];
|
||||
[apl release];
|
||||
|
||||
/* Write it to a file */
|
||||
[NSArchiver archiveRootObject: set toFile: @"./nsarchiver.dat"];
|
||||
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue