Difference between revisions of "User talk:Kirb"

From iPhone Development Wiki
Jump to: navigation, search
m (Reverted edits by Testatest (talk) to last revision by Kirb)
Line 1: Line 1:
The NSAutoreleasePool class is a thin wrapper around the '''NSPushAutoreleasePool''' and '''NSPopAutoreleasePool''' functions.
+
''"filling gaps in hbang tweaks' ios compatibility"''
  
<source lang="objc">
+
Yayyyyyy thanks. [[User:Britta|Britta]] ([[User talk:Britta|talk]]) 04:39, 4 June 2014 (PDT)
#ifdef __cplusplus
+
:Sure thing! [[User:Kirb|kirb]] ([[User talk:Kirb|talk]]) 04:42, 4 June 2014 (PDT)
extern "C" {
 
#endif
 
void *NSPushAutoreleasePool(NSUInteger capacity);
 
void NSPopAutoreleasePool(void* token);
 
#ifdef __cplusplus
 
}
 
#endif
 
</source>
 
 
 
Example:
 
 
 
<source lang="objc">
 
static void MyMethod()
 
{
 
    void *pool = NSPushAutoreleasePool(0);
 
    [[[NSObject alloc] init] autorelease];
 
    NSPopAutoreleasePool(pool);
 
}
 
</source>
 
 
 
The "capacity" argument of NSPushAutoreleasePool only serves as a hint. It is unused in the current implementation.
 
 
 
{{occlass|library=Foundation.framework}}
 

Revision as of 10:58, 2 February 2017

"filling gaps in hbang tweaks' ios compatibility"

Yayyyyyy thanks. Britta (talk) 04:39, 4 June 2014 (PDT)

Sure thing! kirb (talk) 04:42, 4 June 2014 (PDT)