Re: Over-release caused by Instruments?
Re: Over-release caused by Instruments?
- Subject: Re: Over-release caused by Instruments?
- From: Bill Bumgarner <email@hidden>
- Date: Mon, 01 Nov 2010 15:38:53 -0700
On Nov 1, 2010, at 2:40 PM, Dave Keck wrote:
> I'm testing some highly multi-threaded code and am encountering an
> over-release bug, but I'm unable to reproduce it except when running
> the program via the 'Allocations' instrument.
Sounds like a couple of things may be in play:
As Scott said, this could easily be a race condition. If thread B is going to retain something that A is releasing and A beats B, there'll be a window where A causes the deallocation while B is retaining and I could easily imagine this totally hosing the instrumentation (note that as long as A and B are retaining/releasing without causing the deallocation, this shouldn't be a problem).
Also, when running with instrumentation, you are significantly perturbing the thread scheduling and, thus, bugs may likely show up (or not) when run under instrumentation vs. debugging vs. production.
Threads are hard.
b.bum
_______________________________________________
Do not post admin requests to the list. They will be ignored.
Xcode-users mailing list (email@hidden)
Help/Unsubscribe/Update your Subscription:
This email sent to email@hidden