mirror of
https://github.com/gnustep/libs-sqlclient.git
synced 2025-02-19 01:50:49 +00:00
improve diagnostic log
git-svn-id: svn+ssh://svn.gna.org/svn/gnustep/libs/sqlclient/trunk@39138 72102866-910b-0410-8b05-ffd578937521
This commit is contained in:
parent
bd4f1bcf96
commit
182fa71ff3
1 changed files with 17 additions and 2 deletions
|
@ -912,15 +912,30 @@
|
||||||
static Class cls = Nil;
|
static Class cls = Nil;
|
||||||
unsigned long rc;
|
unsigned long rc;
|
||||||
unsigned long ac;
|
unsigned long ac;
|
||||||
|
unsigned long uc;
|
||||||
|
int index;
|
||||||
|
|
||||||
if (Nil == cls)
|
if (Nil == cls)
|
||||||
{
|
{
|
||||||
cls = [NSAutoreleasePool class];
|
cls = [NSAutoreleasePool class];
|
||||||
}
|
}
|
||||||
|
|
||||||
rc = (unsigned long)[o retainCount];
|
rc = (unsigned long)[o retainCount];
|
||||||
ac = (unsigned long)[cls autoreleaseCountForObject: o];
|
ac = (unsigned long)[cls autoreleaseCountForObject: o];
|
||||||
return [NSString stringWithFormat: @" refs %ld (%lu-%lu)",
|
[_lock lock];
|
||||||
rc - ac, rc, ac];
|
uc = 0;
|
||||||
|
for (index = 0; index < _max; index++)
|
||||||
|
{
|
||||||
|
if (o == _items[index].c)
|
||||||
|
{
|
||||||
|
uc = _items[index].u;
|
||||||
|
break;
|
||||||
|
}
|
||||||
|
}
|
||||||
|
[self _unlock];
|
||||||
|
return [NSString stringWithFormat:
|
||||||
|
@" provided %ld times (retained:%lu - autoreleased:%lu)",
|
||||||
|
uc, rc, ac];
|
||||||
}
|
}
|
||||||
#endif
|
#endif
|
||||||
return @"";
|
return @"";
|
||||||
|
|
Loading…
Reference in a new issue