Skip to content

Commit

Permalink
Merge branch 'hotfix/CHT-484-delete-megachat-api' into 'release/v2.4.3a'
Browse files Browse the repository at this point in the history
CHT-484: Add the ability to delete megaChatApi (Obj-C)

See merge request megachat/MEGAchat!1026
  • Loading branch information
alber2510 committed Mar 11, 2021
2 parents 187dff0 + d2e73f6 commit 698d5fc
Show file tree
Hide file tree
Showing 2 changed files with 6 additions and 0 deletions.
1 change: 1 addition & 0 deletions bindings/Objective-C/MEGAChatSdk.h
Original file line number Diff line number Diff line change
Expand Up @@ -88,6 +88,7 @@ typedef NS_ENUM (NSInteger, MEGAChatConnection) {
- (void)importMessagesFromPath:(NSString *)externalDbPath;
- (MEGAChatInit)initAnonymous;
- (void)resetClientId;
- (void)deleteMegaChatApi;

- (MEGAChatInit)initState;

Expand Down
5 changes: 5 additions & 0 deletions bindings/Objective-C/MEGAChatSdk.mm
Original file line number Diff line number Diff line change
Expand Up @@ -148,6 +148,11 @@ - (void)dealloc {
pthread_mutex_destroy(&listenerMutex);
}

- (void)deleteMegaChatApi {
delete _megaChatApi;
pthread_mutex_destroy(&listenerMutex);
}

- (MegaChatApi *)getCPtr {
return _megaChatApi;
}
Expand Down

0 comments on commit 698d5fc

Please sign in to comment.