Amit Vaghela
Amit Vaghela

Reputation: 2970

getting this exception [CFURL release]: message sent to deallocated instance 0x1049530 when debugging iPhone application

Title says everything.

I've enabled NSZombieEnabled for project.

cheers

Upvotes: 2

Views: 2817

Answers (4)

biloshkurskyi.ss
biloshkurskyi.ss

Reputation: 1436

I had same problem and fixed it.

Firstly i create my url:

contentUrl = [NSURL URLWithString:step.Videolink];

and afrer i release it

[contentUrl release];

Its rough mistake, because NSURL URLWithString: create autorelease object.

Upvotes: 0

XCool
XCool

Reputation: 996

I did the exact same thing, e.g. calling [justURL release].. commented that and voila!

Upvotes: 0

Are you calling [justURL release] anywhere? You shouldn't, since it is autoreleased for you...

Upvotes: 6

Dave Batton
Dave Batton

Reputation: 8835

Just a shot in the dark (haven't bothered to test how it would behave), but are you certain that -URLWithString: is returning a value? Are you seeing the URL in the log after the NSLog?

If -URLWithString: doesn't like the URL (for example, if there's a space in it) then it will return a nil value, which -arrayWithContentsOfURL: might not like.

Upvotes: 1

Related Questions