Become a MacRumors Supporter for $50/year with no ads, ability to filter front page stories, and private forums.

cocoaADay

macrumors newbie
Original poster
Nov 1, 2012
1
0
Hi,
In my application, i'm using a view(say X), that has a webview, along with few other controls. On click of a button, i'm creating a tabview item & setting its view property to X.
On clicking "Cancel" button, i'm removing this tabview item.

Application is crashing when these steps are done -
1. Press button(displays tabview item)
2. Click cancel(removes tabview item)
3. Press the button pressed in step 1 again.

There is an issue with the webview. Say on step 1, the webview object was WebView: 0x10564bc00. When i press the same button again(step 3), i'm getting this message in console -
malloc: *** error for object 0x10564bc00: pointer being freed was not allocated
*** set a breakpoint in malloc_error_break to debug

However now the webview object is changed to some 'xyz' value.
Any suggestion on how to fix this?
I'm using xcode 4.5 & ARC is enabled.
 
Register on MacRumors! This sidebar will go away, and you'll see fewer ads.