我看到下面的錯誤在我的應用程序:爲什麼我被告知在malloc_error_break上設置斷點?
(4446,0xa0bc94e0)的malloc:*錯誤對象0x1d153000:指針 被釋放沒有被分配 *在malloc_error_break設置一個斷點調試
這個錯誤是什麼意思?
我想顯示在表視圖中2000個地址,和我看到的錯誤在下面的代碼的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];
}
可能是什麼造成的?
可能與http://stackoverflow.com/questions/7796921/malloc-error-break-breakpoint-not-working – paulmelnikow 2012-03-05 02:32:26
刪除safari檢查http://stackoverflow.com/a/43885754/6521116 – 2017-05-10 07:19:42