Author: rfm
Date: Wed Nov 4 08:38:50 2015
New Revision: 39138
URL: http://svn.gna.org/viewcvs/gnustep?rev=39138&view=rev
Log:
improve diagnostic log
Modified:
libs/sqlclient/trunk/SQLClientPool.m
Modified: libs/sqlclient/trunk/SQLClientPool.m
URL:
http://svn.gna.org/viewcvs/gnustep/libs/sqlclient/trunk/SQLClientPool.m?rev=39138&r1=39137&r2=39138&view=diff
==============================================================================
--- libs/sqlclient/trunk/SQLClientPool.m (original)
+++ libs/sqlclient/trunk/SQLClientPool.m Wed Nov 4 08:38:50 2015
@@ -912,15 +912,30 @@
static Class cls = Nil;
unsigned long rc;
unsigned long ac;
+ unsigned long uc;
+ int index;
if (Nil == cls)
{
cls = [NSAutoreleasePool class];
}
+
rc = (unsigned long)[o retainCount];
ac = (unsigned long)[cls autoreleaseCountForObject: o];
- return [NSString stringWithFormat: @" refs %ld (%lu-%lu)",
- rc - ac, rc, ac];
+ [_lock lock];
+ 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
return @"";
_______________________________________________
Gnustep-cvs mailing list
[email protected]
https://mail.gna.org/listinfo/gnustep-cvs