XSAutoreleasePool Reference

File
XSFoundation/include/XS/Classes/XSAutoreleasePool.h
Author
Jean-David Gadina - www.xs-labs.com
Copyright
© (c) 2020 - Jean-David Gadina - www.xs-labs.com
Date
Sunday, September 27, 2020

Overview

XSAutoreleasePool class

Tasks

XSAutoreleasePoolAddObject

Adds an object to an autorelease pool

XS_EXPORT void XSAutoreleasePoolAddObject( XSAutoreleasePoolRef ap, const void *object );

Parameters
  • ap
    The autorelease pool object
  • object
    The object to add to the autorelease pool

XSAutoreleasePoolCreate

Creates an autorelease pool

XS_EXPORT XSAutoreleasePoolRef XSAutoreleasePoolCreate( void );

Return value

The autorelease pool object

XSAutoreleasePoolDrain

Drains an autorelease pool

XS_EXPORT void XSAutoreleasePoolDrain( XSAutoreleasePoolRef ap );

Parameters
  • ap
    The autorelease pool object

XSAutoreleasePoolGetClassID

Gets the class ID for XSAutoreleasePool

XS_EXPORT XSClassID XSAutoreleasePoolGetClassID( void );

Return value

The class ID for XSAutoreleasePool

XSAutoreleasePoolGetCurrent

Gets the current autorepease pool for the current thread

XSAutoreleasePoolRef XSAutoreleasePoolGetCurrent( void );

Return value

The current autorelease pool, if one exists

Types

XSAutoreleasePoolRef

Opaque type for XSAutoreleasePool

typedef struct XSAutoreleasePool * XSAutoreleasePoolRef;