My app is crash with the message : "Message from debugger: Terminated due to memory issue", when my tableview is reload with row counts are increased.
I have fetch the data on row from document directory path, and show the image of path on imageview of particular cell index, when the row count is reached at 10, it terminate with above mentioned message.
My code of cellForRowAt IndexPath
is given below:
func tableView(_ tableView: UITableView, cellForRowAt indexPath: IndexPath) -> UITableViewCell {
let cell : signatureCell = tableView.dequeueReusableCell(withIdentifier: "signatureCell") as! signatureCell
cell.selectionStyle = .none
do
{
let imageURL = SignImagesURL[indexPath.row]
let image = UIImage(contentsOfFile: imageURL.path)
cell.imgSignature.image = image
}
catch {
}
return cell
}
Please give me the solutions to avoid it.