Re: Continuously running daemon process CFConstantStringRefs build up over time
Re: Continuously running daemon process CFConstantStringRefs build up over time
- Subject: Re: Continuously running daemon process CFConstantStringRefs build up over time
- From: Dave Keck <email@hidden>
- Date: Fri, 1 Oct 2010 04:00:49 -0400
Since you're writing a daemon, you'll need to handle autorelease-pool
creation and draining manually (something that's normally handled by
NSApplication in standard AppKit apps.) Perhaps objects are
autoreleased and placed in the root autorelease pool (that you might
be creating in main() or the like) which is never drained?
Also, how many strings are leaking? I know the frameworks cache
NSNumber instances; I'm not sure about immutable strings.
> I have run the daemon through the clang static analyzer and the Instruments leaks tool but none are reporting any leaks. I have even downloaded a fresh copy of valgrind from svn and it too is not finding anything. The instruments allocation monitor is reporting that there are CFConstantStringRefs that Foundation is allocating from internal methods and CFSTR macros that I am using in some functions. I'm happy to provide more details of the actual call-stacks and code if necessary.
A pedantic detail: note that strings created with CFSTR exist
statically within your executable (they aren't dynamically allocated)
and therefore aren't leaks.
_______________________________________________
Cocoa-dev mailing list (email@hidden)
Please do not post admin requests or moderator comments to the list.
Contact the moderators at cocoa-dev-admins(at)lists.apple.com
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden