mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 00:11:26 +00:00
Put autorelease pools in place
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@3019 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
f9ea6ad12e
commit
1561ce4134
21 changed files with 63 additions and 0 deletions
|
@ -2,6 +2,7 @@
|
|||
|
||||
/* For demo of Strings as Collections of char's. */
|
||||
#include <Foundation/NSString.h>
|
||||
#include <Foundation/NSAutoreleasePool.h>
|
||||
|
||||
void
|
||||
print_string(NSString* s)
|
||||
|
@ -14,6 +15,7 @@ print_string(NSString* s)
|
|||
|
||||
int main()
|
||||
{
|
||||
NSAutoreleasePool *arp = [NSAutoreleasePool new];
|
||||
id s = @"This is a test string";
|
||||
id s2, s3;
|
||||
|
||||
|
@ -59,5 +61,6 @@ int main()
|
|||
}
|
||||
#endif
|
||||
|
||||
[arp release];
|
||||
exit(0);
|
||||
}
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue