Little leak when running this code, would you know why this happens? #150

Closed
opened 2025-12-29 15:25:47 +01:00 by adam · 2 comments
Owner

Originally created by @Plnda on GitHub (Jul 6, 2017).

    do {

        try CoreStore.perform(synchronous: { transaction -> Void in
        // Delete the current user data
            transaction.deleteAll(From<User>())

            var avatarString = tripleAUser.avatarURI
            if !avatarString.contains("https:") {
            avatarString = "https:" + avatarString
            }

            // Create a new user
            let user = transaction.create(Into<User>())
            user.identifier = Int64(tripleAUser.id)
            user.name = tripleAUser.name
            user.email = tripleAUser.email
            user.avatar = avatarString
        })
    } catch _ {
        print("error")
    }
Originally created by @Plnda on GitHub (Jul 6, 2017). do { try CoreStore.perform(synchronous: { transaction -> Void in // Delete the current user data transaction.deleteAll(From<User>()) var avatarString = tripleAUser.avatarURI if !avatarString.contains("https:") { avatarString = "https:" + avatarString } // Create a new user let user = transaction.create(Into<User>()) user.identifier = Int64(tripleAUser.id) user.name = tripleAUser.name user.email = tripleAUser.email user.avatar = avatarString }) } catch _ { print("error") }
adam added the irreproducible label 2025-12-29 15:25:47 +01:00
adam closed this issue 2025-12-29 15:25:47 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Jul 6, 2017):

@Plnda I can't tell with just this code, can you give other info? Have you found through Instruments what objects/types are getting leaked?

@JohnEstropia commented on GitHub (Jul 6, 2017): @Plnda I can't tell with just this code, can you give other info? Have you found through Instruments what objects/types are getting leaked?
Author
Owner

@JohnEstropia commented on GitHub (Jul 15, 2017):

@Plnda Have you resolved this issue? I will close this issue as irreproducible as I can't see this happening on the demo app.

@JohnEstropia commented on GitHub (Jul 15, 2017): @Plnda Have you resolved this issue? I will close this issue as irreproducible as I can't see this happening on the demo app.
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore#150