Skip to content

Momory Leak #570

@parmar-mehul

Description

@parmar-mehul

Description

Describe your issue here.

What type of issue is this? (place an x in one of the [ ])

  • [ x ] bug

Requirements (place an x in each of the [ ])

  • [x ] I've read and understood the Contributing guidelines and have done my best effort to follow them.
  • [ x] I've read and agree to the Code of Conduct.
  • [x ] I've searched for any related issues and avoided creating a duplicate issue.

Bug Report

SkeletonView Environment:

SkeletonView version: 1.31.0
Xcode version: Version 15.4 (15F31d)
Swift version: 5.10

Steps to reproduce:

Please replace this with the steps to reproduce the behavior.

  1. Change rootViewController
  2. Previous controller unable to deinit because of SkeletonCollectionViewDataSource
  3. Attached screenshot

Expected result:

App should release object and view Controller should deinit

Actual result:

Getting strong object in memory even after changing pop or dismiss view controller

Attachments:

Logs, screenshots, sample project, funny gif, etc.

code,

extension DashboardVC : SkeletonCollectionViewDataSource {
	func collectionSkeletonView(_ skeletonView: UICollectionView, cellIdentifierForItemAt indexPath: IndexPath) -> SkeletonView.ReusableCellIdentifier {
		return "ConsultCell"
	}

	func collectionSkeletonView(_ skeletonView: UICollectionView, numberOfItemsInSection section: Int) -> Int {
		var count = self.arrRecentConsult.count
		if count == 0 {
			count = 1
		}

		return count
	}

	func collectionSkeletonView(_ skeletonView: UICollectionView, skeletonCellForItemAt indexPath: IndexPath) -> UICollectionViewCell? {
		let cell = skeletonView.dequeueReusableCell(withReuseIdentifier: "ConsultCell", for: indexPath) as! ConsultCell
		return cell
	}
}

Screenshot 2024-05-30 at 8 20 08 PM
Screenshot 2024-05-30 at 8 18 07 PM

Metadata

Metadata

Assignees

No one assigned

    Labels

    No labels
    No labels

    Projects

    No projects

    Milestone

    No milestone

    Relationships

    None yet

    Development

    No branches or pull requests

    Issue actions