Re: Re[4]: NSTableView and memory management problem.
Re: Re[4]: NSTableView and memory management problem.
- Subject: Re: Re[4]: NSTableView and memory management problem.
- From: Ondra Cada <email@hidden>
- Date: Mon, 28 Mar 2005 23:40:32 +0200
Dmitry,
On 28.3.2005, at 23:54, Dmitry Basko wrote:
Will try, although this is not clear how I can check this pool, which
is a part of the _internal_ implementation of the certain class. Need
to read some more documentation.
Far as I know, the API is not quite rich. Try showPools (I haven't,
dunno what it does). The complete NSAutoreleasePool API (including
non-publics) seems to be (in 10.3.8, removing uninteresting printout):
> class-dump -C NSAutoreleasePool
/System/Library/Frameworks/Foundation.framework/Foundation
@interface NSAutoreleasePool : NSObject
+ (void)addObject:(id)fp8;
+ (void)releaseAllPools;
+ (void)showPools;
+ (unsigned int)autoreleasedObjectCount;
+ (unsigned int)topAutoreleasePoolCount;
+ (BOOL)autoreleasePoolExists;
+ (void)enableRelease:(BOOL)fp8;
+ (void)enableFreedObjectCheck:(BOOL)fp8;
+ (unsigned int)poolCountHighWaterMark;
+ (void)setPoolCountHighWaterMark:(unsigned int)fp8;
+ (unsigned int)poolCountHighWaterResolution;
+ (void)setPoolCountHighWaterResolution:(unsigned int)fp8;
+ (unsigned int)totalAutoreleasedObjects;
+ (void)resetTotalAutoreleasedObjects;
@end
In my personal experience, if the (auto)release problem becomes to be
somewhat difficult, the best cure may be
(a) determine which object causes the problem (here NSZombieEnabled
does help);
(b) trace its life reimplementing its retain/release/autorelease
methods, generally on the lines of
-retain {
NSLog(@"%@:%x retaining, curr rc %d",[self class],self,[self
retainCount]);
return [super retain];
}
(and similar for others)
Anyway, YMMV :)
---
Ondra Čada
OCSoftware: email@hidden http://www.ocs.cz
private email@hidden http://www.ocs.cz/oc
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Cocoa-dev mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden