Skip to content
New issue

Have a question about this project? Sign up for a free GitHub account to open an issue and contact its maintainers and the community.

By clicking “Sign up for GitHub”, you agree to our terms of service and privacy statement. We’ll occasionally send you account related emails.

Already on GitHub? Sign in to your account

DropdownMenu leaks memory #41

Closed
Skyb0rg opened this issue Jan 15, 2016 · 6 comments
Closed

DropdownMenu leaks memory #41

Skyb0rg opened this issue Jan 15, 2016 · 6 comments

Comments

@Skyb0rg
Copy link

Skyb0rg commented Jan 15, 2016

Hi,

i create a function which will create the DropdownMenu.
Every time i run this function 2mb of ram will get lost.

if i open a view like in you example close it an reopen it 5-10mb of ram are lost.

hope you understand what i mean.

i think it has something to do with "closures and strong reference cycle",
but i didn´t find the error.

Thanks.

@JeanMeche
Copy link

An [weak self] is required in the init

 self.tableView.selectRowAtIndexPathHandler = { [weak self] (indexPath: Int) -> () in
            self?.didSelectItemAtIndexHandler!(indexPath: indexPath)
            self?.layoutSubviews()
        }

@csurbier
Copy link

@kyro38 i still have the same issue that @Skyb0rg even with this modification. Any update?

Thanks
Christophe

@Skyb0rg
Copy link
Author

Skyb0rg commented Feb 23, 2016

Created a custom menu on my own, sorry.

Von meinem iPhone gesendet

Am 23.02.2016 um 16:42 schrieb csurbier [email protected]:

@kyro38 i still have the same issue that @Skyb0rg even with this modification. Any update?

Thanks
Christophe


Reply to this email directly or view it on GitHub.

@csurbier
Copy link

@Skyb0rg don't worry, i think i'm gonna to do the same or try to correct this library

@andykog
Copy link
Contributor

andykog commented Feb 29, 2016

Seems, that #45 fixes this

@PhamBaTho
Copy link
Owner

PR #45 merged. Thanks @andykog for your pull request :)

Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment
Labels
None yet
Projects
None yet
Development

No branches or pull requests

5 participants