summaryrefslogtreecommitdiff
path: root/vcl/ios
diff options
context:
space:
mode:
authorTor Lillqvist <tml@iki.fi>2013-03-17 16:37:02 +0200
committerTor Lillqvist <tml@iki.fi>2013-03-18 07:41:33 +0200
commit6dfe7e790352e3e3ff63cfd8b142a8fc007b496c (patch)
treeadc928a4151addec7a9117aaca5f7658947c0896 /vcl/ios
parent39c603ca8964295067775a4e0ec768ca7fd6feea (diff)
Don't do any own auto-cleanup of aurorelease pools on iOS when a thread ends
According to documentation, the system does it automatically. Testing seemed to confirm that, with the code still in I got mysterious crashes. Not sure if the corresponding code is unnecessary or wrong on OS X, too. Change-Id: I14e9f5bcc0376e9235f8d36b484b38c1e44932c4
Diffstat (limited to 'vcl/ios')
-rw-r--r--vcl/ios/source/app/saldata.cxx22
1 files changed, 1 insertions, 21 deletions
diff --git a/vcl/ios/source/app/saldata.cxx b/vcl/ios/source/app/saldata.cxx
index cc02eca59428..f06b139364a3 100644
--- a/vcl/ios/source/app/saldata.cxx
+++ b/vcl/ios/source/app/saldata.cxx
@@ -24,12 +24,6 @@
oslThreadKey SalData::s_aAutoReleaseKey = 0;
-static void SAL_CALL releasePool( void* pPool )
-{
- if( pPool )
- [(NSAutoreleasePool*)pPool release];
-}
-
SalData::SalData()
:
mpTimerProc( NULL ),
@@ -46,7 +40,7 @@ SalData::SalData()
mnDPIY( 0 )
{
if( s_aAutoReleaseKey == 0 )
- s_aAutoReleaseKey = osl_createThreadKey( releasePool );
+ s_aAutoReleaseKey = osl_createThreadKey( NULL );
}
SalData::~SalData()
@@ -55,20 +49,6 @@ SalData::~SalData()
CGColorSpaceRelease( mxP50Space );
CGColorSpaceRelease( mxRGBSpace );
CGColorSpaceRelease( mxGraySpace );
- if( s_aAutoReleaseKey )
- {
- // release the last pool
- NSAutoreleasePool* pPool = nil;
- pPool = reinterpret_cast<NSAutoreleasePool*>( osl_getThreadKeyData( s_aAutoReleaseKey ) );
- if( pPool )
- {
- osl_setThreadKeyData( s_aAutoReleaseKey, NULL );
- [pPool release];
- }
-
- osl_destroyThreadKey( s_aAutoReleaseKey );
- s_aAutoReleaseKey = 0;
- }
}
void SalData::ensureThreadAutoreleasePool()