mirror of
https://github.com/gnustep/libs-base.git
synced 2025-05-30 08:21:25 +00:00
Catch autoreleased objects during thread exit.
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/base/trunk@22333 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
909f32bf87
commit
7a186a7782
4 changed files with 29 additions and 5 deletions
|
@ -703,7 +703,10 @@ gnustep_base_thread_callback(void)
|
|||
DESTROY(_thread_dictionary);
|
||||
DESTROY(_target);
|
||||
DESTROY(_arg);
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
if (_autorelease_vars.pool_cache != 0)
|
||||
{
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
}
|
||||
|
||||
if (_thread_dictionary != nil)
|
||||
{
|
||||
|
@ -711,11 +714,17 @@ gnustep_base_thread_callback(void)
|
|||
* Try again to get rid of thread dictionary.
|
||||
*/
|
||||
DESTROY(_thread_dictionary);
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
if (_autorelease_vars.pool_cache != 0)
|
||||
{
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
}
|
||||
if (_thread_dictionary != nil)
|
||||
{
|
||||
NSLog(@"Oops - leak - thread dictionary is %@", _thread_dictionary);
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
if (_autorelease_vars.pool_cache != 0)
|
||||
{
|
||||
[NSAutoreleasePool _endThread: self];
|
||||
}
|
||||
}
|
||||
}
|
||||
if (self == defaultThread)
|
||||
|
|
Loading…
Add table
Add a link
Reference in a new issue