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

Fix retain cycles #67

Merged
merged 1 commit into from
May 5, 2016
Merged

Conversation

turbokuzmich
Copy link

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
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
2 participants