On Aug 17, 2008, at 22:40 , Lawrence Johnston wrote:
Hey everybody,I've got a situation I'm kind of puzzling over. If I run my program though leaks, I'm getting a leak at a certain point, but where it's coming from is really confusing me.I've pulled the urlRequest entirely out into a new dummy program and I'm still getting a leak here.This is the code I'm using: [snip]and then if I run it using a leak I'm getting a leak, for example the last time I got a leak of size 3.58KB at 0.16 minutes (9.6 seconds).The leak is as follows:# Category Event Type Timestamp Address Size Responsible Library Responsible Caller 0 GeneralBlock -3584 Malloc 00:05.538 0x83b200 3584 CFNetwork httpWrFilterOpen 1 GeneralBlock -3584 Free 00:14.539 0x83b200 -3584 libSystem.B.dylib _pthread_body 2 GeneralBlock -2048 Realloc 00:14.703 0x83b200 2048 CFNetwork sendDidReceiveDataCallbackThe weird part is as far as I can tell the memory in question is actually getting released! (at 14 seconds)So is this some sort of weird false positive? Or am I missing something?
It looks to me like the 3.58KB was released... that's number 1 on your list, so there is not leak. The memory you have allocated (2048 bytes) looks like it's the read buffer that was created for you and which you either haven't read yet or simply hasn't been released yet. CFNetwork may also keep the buffer around in case you call it again to avoid
allocating and reallocating memory all the time. /jason
smime.p7s
Description: S/MIME cryptographic signature
_______________________________________________ Cocoa-dev mailing list (Cocoa-dev@lists.apple.com) 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: http://lists.apple.com/mailman/options/cocoa-dev/archive%40mail-archive.com This email sent to [EMAIL PROTECTED]