Giter Site home page Giter Site logo

Comments (4)

ifabijanovic avatar ifabijanovic commented on August 26, 2024 4

I'm afraid it's worse than this - the client itself is in a retain cycle from initialization and it cannot be released (on logout for example). Simply doing something like this (using code from sample):

let databaseURL = URL(fileURLWithPath:NSTemporaryDirectory()).appendingPathComponent("events-app-db")            
let appSyncConfig = try AWSAppSyncClientConfiguration(appSyncClientInfo: AWSAppSyncClientInfo(), databaseURL: databaseURL)
self.appSyncClient = try AWSAppSyncClient(appSyncConfig: appSyncConfig)
self.appSyncClient = nil

Will not release AWSAppSyncClient, which in turn won't release a whole graph of objects including an SQLite Connection.

from aws-mobile-appsync-sdk-ios.

joelmbell avatar joelmbell commented on August 26, 2024

This is affecting us as well, hoping that MR can get merged into a new version soon. We currently have a bug where mutations are attempting to send after a user has logged out. AppSyncClient should be nil'd out before that happens but due to the retain cycle we can't stop it from sending stored mutations if they exist

from aws-mobile-appsync-sdk-ios.

palpatim avatar palpatim commented on August 26, 2024

Hi folks,

We've recently added tests to ensure that we do in fact release appSyncClient when the owner sets to nil.

4936c31

It should be fixed as of 2.9.1.

from aws-mobile-appsync-sdk-ios.

stale avatar stale commented on August 26, 2024

This issue has been automatically closed because of inactivity. Please open a new issue if are still encountering problems.

from aws-mobile-appsync-sdk-ios.

Related Issues (20)

Recommend Projects

  • React photo React

    A declarative, efficient, and flexible JavaScript library for building user interfaces.

  • Vue.js photo Vue.js

    🖖 Vue.js is a progressive, incrementally-adoptable JavaScript framework for building UI on the web.

  • Typescript photo Typescript

    TypeScript is a superset of JavaScript that compiles to clean JavaScript output.

  • TensorFlow photo TensorFlow

    An Open Source Machine Learning Framework for Everyone

  • Django photo Django

    The Web framework for perfectionists with deadlines.

  • D3 photo D3

    Bring data to life with SVG, Canvas and HTML. 📊📈🎉

Recommend Topics

  • javascript

    JavaScript (JS) is a lightweight interpreted programming language with first-class functions.

  • web

    Some thing interesting about web. New door for the world.

  • server

    A server is a program made to process requests and deliver data to clients.

  • Machine learning

    Machine learning is a way of modeling and interpreting data that allows a piece of software to respond intelligently.

  • Game

    Some thing interesting about game, make everyone happy.

Recommend Org

  • Facebook photo Facebook

    We are working to build community through open source technology. NB: members must have two-factor auth.

  • Microsoft photo Microsoft

    Open source projects and samples from Microsoft.

  • Google photo Google

    Google ❤️ Open Source for everyone.

  • D3 photo D3

    Data-Driven Documents codes.