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

Closing a repository document leaks everything #439

Open
wants to merge 3 commits into
base: master
Choose a base branch
from
Open

Closing a repository document leaks everything #439

wants to merge 3 commits into from

Commits on Mar 18, 2015

  1. PBViewControllers contain a strong reference to a PBGitWindowControll…

    …er 'super controller',
    
    and the only place these objects are ever created is within the PBGitWindowController...which
    contains a strong, owning reference to these objects creating a retain cycle.
    mattlilek committed Mar 18, 2015
    Configuration menu
    Copy the full SHA
    01767d3 View commit details
    Browse the repository at this point in the history
  2. Stop leaking the repository's PBGitHistoryList and many related objec…

    …ts by breaking a retain
    
    cycle between the PBGitHistoryList and its internal PBGitHistoryGrapher. The grapher maintained
    a strong reference to it's "delegate", but is only ever owned by the same object.
    
    Make the "delegate" a weak reference. The two places it's used, create a strong reference while it's used.
    
    Finally, -[PBGitRepository close] calls -[PBGitHistoryList cleanup] but so does -[PBGitHistoryList dealloc].
    Avoid an uncaught exception/crash by nil-ing out the currentRevList after we've cleaned up as it's no
    longer valid.
    mattlilek committed Mar 18, 2015
    Configuration menu
    Copy the full SHA
    56949f8 View commit details
    Browse the repository at this point in the history
  3. Most IBOutlets should be weak. This breaks many retain cycles and

    means many more objects are getting released at the proper time.
    mattlilek committed Mar 18, 2015
    Configuration menu
    Copy the full SHA
    9230de7 View commit details
    Browse the repository at this point in the history