Problem with early-deallocated fetched objects #246

Closed
opened 2025-12-29 18:24:52 +01:00 by adam · 2 comments
Owner

Originally created by @evkalinin on GitHub (Nov 28, 2018).

I have a problem with early-deallocated fetched objects.

Please, can you see what is wrong?

6859babd5c/CoreStoreTests/IssueTests.swift (L53)

and some tests for legacy storage are broken.

Originally created by @evkalinin on GitHub (Nov 28, 2018). I have a problem with early-deallocated fetched objects. Please, can you see what is wrong? https://github.com/clouddevil/CoreStore/blob/6859babd5c63b5dcd9d18034291d174db681c105/CoreStoreTests/IssueTests.swift#L53 and some tests for legacy storage are broken.
adam closed this issue 2025-12-29 18:24:52 +01:00
Author
Owner

@JohnEstropia commented on GitHub (Nov 28, 2018):

You will never get the same store if you use the BaseTestCase. prepareStack() method because it generates a new UUID (thus a new sqlite file) for each call.
See: https://github.com/JohnEstropia/CoreStore/blob/develop/CoreStoreTests/BaseTests/BaseTestCase.swift#L53

If you wish to use a shared store just call addStorage() on your own.

@JohnEstropia commented on GitHub (Nov 28, 2018): You will never get the same store if you use the `BaseTestCase. prepareStack()` method because it generates a new UUID (thus a new sqlite file) for each call. See: https://github.com/JohnEstropia/CoreStore/blob/develop/CoreStoreTests/BaseTests/BaseTestCase.swift#L53 If you wish to use a shared store just call `addStorage()` on your own.
Author
Owner

@evkalinin commented on GitHub (Nov 28, 2018):

Oh YES! thank you!!

@evkalinin commented on GitHub (Nov 28, 2018): Oh YES! thank you!!
Sign in to join this conversation.
1 Participants
Notifications
Due Date
No due date set.
Dependencies

No dependencies set.

Reference: starred/CoreStore-JohnEstropia#246