Skip to content
This repository was archived by the owner on Nov 26, 2020. It is now read-only.

Fix retain cycles#67

Merged
hebertialmeida merged 1 commit into
FolioReader:masterfrom
turbokuzmich:master
May 5, 2016
Merged

Fix retain cycles#67
hebertialmeida merged 1 commit into
FolioReader:masterfrom
turbokuzmich:master

Conversation

@turbokuzmich
Copy link
Copy Markdown

Profiling in Instruments revealed a retain cycle problem. After dismissing FolioReaderContainer still keeps living along with several other objects (FolioReaderCenter, FolioReaderAudioPlayer and so on).

My commit only fixes a use case when FolioReaderContainer is modally presented and then immediately dismissed. No other interactions (e.g. chapter navigation, sharing etc.) were performed. So I suggest a better inspection.

I also noticed that in FolioReaderContainer.swift there are three static variables: readerConfig, epubPath and book. These variables also stay alive after dismissing VC. Maybe FolioReader is a better place for them?

@hebertialmeida hebertialmeida self-assigned this May 5, 2016
@hebertialmeida
Copy link
Copy Markdown
Member

Hey @turbokuzmich

Thanks, I will check that.

@hebertialmeida hebertialmeida merged commit 3d5da64 into FolioReader:master May 5, 2016
Sign up for free to subscribe to this conversation on GitHub. Already have an account? Sign in.

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants