mirror of
https://github.com/kennethreitz-archive/gitx.git
synced 2026-06-05 23:40:18 +00:00
53d92fb73e
- make sure to remove themselves from KV and notification center observers
- add the PBWebHistoryController to PBHistoryController so it can be told to close
- replaced the -removeView methods with -closeView (-removeView was not being used)
- clear any obj-c objects set in web scripting objects
This last item seems to be the reason that the web controllers and the current commit did not get collected which then held the repository document from being collected as well.
61 lines
1.0 KiB
Objective-C
61 lines
1.0 KiB
Objective-C
//
|
|
// PBViewController.m
|
|
// GitX
|
|
//
|
|
// Created by Pieter de Bie on 22-09-08.
|
|
// Copyright 2008 __MyCompanyName__. All rights reserved.
|
|
//
|
|
|
|
#import "PBViewController.h"
|
|
|
|
|
|
@implementation PBViewController
|
|
|
|
@synthesize repository;
|
|
@synthesize status;
|
|
@synthesize isBusy;
|
|
|
|
- (id)initWithRepository:(PBGitRepository *)theRepository superController:(PBGitWindowController *)controller
|
|
{
|
|
NSString *nibName = [[[self class] description] stringByReplacingOccurrencesOfString:@"Controller"
|
|
withString:@"View"];
|
|
if(self = [self initWithNibName:nibName bundle:nil]) {
|
|
repository = theRepository;
|
|
superController = controller;
|
|
}
|
|
|
|
return self;
|
|
}
|
|
|
|
- (void)closeView
|
|
{
|
|
[self unbind:@"repository"];
|
|
if (hasViewLoaded)
|
|
[[self view] removeFromSuperview]; // remove the current view
|
|
}
|
|
|
|
- (void)awakeFromNib
|
|
{
|
|
hasViewLoaded = YES;
|
|
}
|
|
|
|
- (NSResponder *)firstResponder;
|
|
{
|
|
return nil;
|
|
}
|
|
|
|
- (IBAction) refresh: sender
|
|
{
|
|
}
|
|
|
|
// The next methods should be implemented in the subclass if necessary
|
|
- (void)updateView
|
|
{
|
|
}
|
|
|
|
- (void)viewLoaded
|
|
{
|
|
}
|
|
|
|
@end
|