{"action":"created","issue":{"url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/47","repository_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios","labels_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/47/labels{/name}","comments_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/47/comments","events_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/47/events","html_url":"https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/47","id":340654975,"node_id":"MDU6SXNzdWUzNDA2NTQ5NzU=","number":47,"title":"Conflicting memory management behaviour between AppSyncMQTTClient and MQTTSubscritionWatcher","user":{"login":"MarioBajr","id":239279,"node_id":"MDQ6VXNlcjIzOTI3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/239279?v=4","gravatar_id":"","url":"https://api.github.com/users/MarioBajr","html_url":"https://github.com/MarioBajr","followers_url":"https://api.github.com/users/MarioBajr/followers","following_url":"https://api.github.com/users/MarioBajr/following{/other_user}","gists_url":"https://api.github.com/users/MarioBajr/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioBajr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioBajr/subscriptions","organizations_url":"https://api.github.com/users/MarioBajr/orgs","repos_url":"https://api.github.com/users/MarioBajr/repos","events_url":"https://api.github.com/users/MarioBajr/events{/privacy}","received_events_url":"https://api.github.com/users/MarioBajr/received_events","type":"User","site_admin":false},"labels":[],"state":"closed","locked":false,"assignee":null,"assignees":[],"milestone":null,"comments":0,"created_at":"2018-07-12T14:10:09Z","updated_at":"2018-07-14T13:51:17Z","closed_at":"2018-07-14T13:51:17Z","author_association":"CONTRIBUTOR","body":"Hi, \r\nwhile working on #28 crash fix pointed in #39, I noticed that `AppSyncMQTTClient` strongly holds all `MQTTSubscritionWatcher` instances in `topicSubscribersDictionary`. The only way to remove those instances is to call `stopSubscription(subscription:)` passing the watcher in the argument. This could be a desired behaviour, but it conflicts with `AWSAppSyncSubscriptionWatcher`, which is the only implementation of `MQTTSubscritionWatcher` protocol, calling `stopSubscription(subscription:) ` on `deinit`. In this approach It's impossible to have the execution of `deinit` without first releasing the reference in `AppSyncMQTTClient` by calling `stopSubscription(subscription:)` explicitly, and then having it called again by `deinit`."},"comment":{"url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/comments/405025007","html_url":"https://github.com/awslabs/aws-mobile-appsync-sdk-ios/issues/47#issuecomment-405025007","issue_url":"https://api.github.com/repos/awslabs/aws-mobile-appsync-sdk-ios/issues/47","id":405025007,"node_id":"MDEyOklzc3VlQ29tbWVudDQwNTAyNTAwNw==","user":{"login":"MarioBajr","id":239279,"node_id":"MDQ6VXNlcjIzOTI3OQ==","avatar_url":"https://avatars0.githubusercontent.com/u/239279?v=4","gravatar_id":"","url":"https://api.github.com/users/MarioBajr","html_url":"https://github.com/MarioBajr","followers_url":"https://api.github.com/users/MarioBajr/followers","following_url":"https://api.github.com/users/MarioBajr/following{/other_user}","gists_url":"https://api.github.com/users/MarioBajr/gists{/gist_id}","starred_url":"https://api.github.com/users/MarioBajr/starred{/owner}{/repo}","subscriptions_url":"https://api.github.com/users/MarioBajr/subscriptions","organizations_url":"https://api.github.com/users/MarioBajr/orgs","repos_url":"https://api.github.com/users/MarioBajr/repos","events_url":"https://api.github.com/users/MarioBajr/events{/privacy}","received_events_url":"https://api.github.com/users/MarioBajr/received_events","type":"User","site_admin":false},"created_at":"2018-07-14T13:51:17Z","updated_at":"2018-07-14T13:51:17Z","author_association":"CONTRIBUTOR","body":"This issue was fixed in #28. In this PR, `AppSyncMQTTClient` retain all instances of `MQTTSubscritionWatcher` weakly via usage of NSHashTable."}}
{"actor":{"display_login":"MarioBajr"}}