Skip to content
This repository has been archived by the owner on Dec 16, 2019. It is now read-only.

Commit

Permalink
修复聊天界面内存无法释放的Bug
Browse files Browse the repository at this point in the history
  • Loading branch information
siegrainwong committed Apr 28, 2016
1 parent 9db839f commit 3c89dd0
Show file tree
Hide file tree
Showing 2 changed files with 22 additions and 0 deletions.
18 changes: 18 additions & 0 deletions WeChat/Chat/Controller/ChatroomViewController.m
Original file line number Diff line number Diff line change
Expand Up @@ -40,6 +40,24 @@
@end

@implementation ChatroomViewController
#pragma mark - release
- (void)dealloc
{
// NSLog(@"chatroom VC 已释放");
}
- (void)viewDidDisappear:(BOOL)animated
{
self.context = nil;
self.apiConfig = nil;
self.apiRequest = nil;
self.chatModelArray = nil;

[self.editorView removeFromSuperview];
self.editorView = nil;

[self.tableView removeFromSuperview];
self.tableView = nil;
}
#pragma mark - accessors
- (NSManagedObjectContext*)context
{
Expand Down
4 changes: 4 additions & 0 deletions WeChat/Chat/View/BaseMessageTableViewCell.m
Original file line number Diff line number Diff line change
Expand Up @@ -22,6 +22,10 @@
@end

@implementation BaseMessageTableViewCell
- (void)dealloc
{
// NSLog(@"BaseMessageCell V 已释放");
}
#pragma mark - init
- (instancetype)initWithStyle:(UITableViewCellStyle)style
reuseIdentifier:(NSString*)reuseIdentifier
Expand Down

0 comments on commit 3c89dd0

Please sign in to comment.