I'm seeing the following error in my application:
(4446,0xa0bc94e0) malloc: * error for object 0x1d153000: pointer being freed was not allocated * set a breakpoint in malloc_error_break to debug
What does this error mean?
I am trying to display 2000 addresses in a table view, and am seeing that error in the following code with cellForRowAtIndexPath:
- (UITableViewCell *)tableView:(UITableView *)tableView cellForRowAtIndexPath:(NSIndexPath *)indexPath {
static NSString *CellIdentifier = @"Cell";
UITableViewCell *cell = [tableView dequeueReusableCellWithIdentifier:CellIdentifier];
if (cell == nil)
{
cell = [[[UITableViewCell alloc] initWithStyle:UITableViewCellStyleDefault reuseIdentifier:CellIdentifier] autorelease];
}
obdata = [AddressBookData alloc];
obdata = [arrayLocalAddressbook objectAtIndex:indexPath.row];
// Set button Tag
cell.textLabel.text = [NSString stringWithString:obdata.lastname];
return cell;
}
// Customize the number of sections in the table view.
- (NSInteger)numberOfSectionsInTableView:(UITableView *)tableView {
//return [indexArray count];
return 1;
}
// Customize the number of rows in the table view.
- (NSInteger)tableView:(UITableView *)tableView numberOfRowsInSection:(NSInteger)section
{
return [arrayLocalAddressbook count];
}
What could be causing this?