Skip to content

CallbackCache: added assertion for tests to ensure we don't leak callbacks#2137

Merged
NachoSoto merged 1 commit into
mainfrom
callback-cache-deinit-assertion
Dec 13, 2022
Merged

CallbackCache: added assertion for tests to ensure we don't leak callbacks#2137
NachoSoto merged 1 commit into
mainfrom
callback-cache-deinit-assertion

Conversation

@NachoSoto

Copy link
Copy Markdown
Contributor

See also #2135.
I'm looking into the leak in #2105, and I have a theory that it's due to callbacks being stored in this cache, but sometimes not being dequeued, so leaking all references in them.

This assertion will only run in RC tests, and will ensure that this doesn't happen.

@NachoSoto NachoSoto added the test label Dec 12, 2022
@NachoSoto NachoSoto requested a review from a team December 12, 2022 20:30
…llbacks

See also #2135.
I'm looking into the leak in #2105, and I have a theory that it's due to callbacks being stored in this cache, but sometimes not being dequeued, so leaking all references in them.

This assertion will only run in RC tests, and will ensure that this doesn't happen.
@NachoSoto NachoSoto force-pushed the callback-cache-deinit-assertion branch from ef5e3b3 to 50c238c Compare December 12, 2022 20:38
@NachoSoto NachoSoto merged commit 8a84ffb into main Dec 13, 2022
@NachoSoto NachoSoto deleted the callback-cache-deinit-assertion branch December 13, 2022 16:24
NachoSoto added a commit that referenced this pull request Dec 13, 2022
This was a conflict between #2136 and #2137.
NachoSoto added a commit that referenced this pull request Dec 13, 2022
This was a conflict between #2136 and #2137.
NachoSoto pushed a commit that referenced this pull request Dec 14, 2022
**This is an automatic release.**

### Bugfixes
* Un-deprecate `Purchases.configure(withAPIKey:appUserID:)` and
`Purchases.configure(withAPIKey:appUserID:observerMode:)` (#2129) via
NachoSoto (@NachoSoto)
### Other Changes
* `ReceiptFetcherTests`: refactored tests using `waitUntilValue` (#2144)
via NachoSoto (@NachoSoto)
* Added a few performance improvements for `ReceiptParser` (#2124) via
NachoSoto (@NachoSoto)
* `CallbackCache`: fixed reference (#2143) via NachoSoto (@NachoSoto)
* `PostReceiptDataOperation`: clarified receipt debug log (#2128) via
NachoSoto (@NachoSoto)
* `CallbackCache`: avoid exposing internal mutable cache (#2136) via
NachoSoto (@NachoSoto)
* `CallbackCache`: added assertion for tests to ensure we don't leak
callbacks (#2137) via NachoSoto (@NachoSoto)
* `NetworkOperation`: made `Atomic` references immutable (#2139) via
NachoSoto (@NachoSoto)
* `ReceiptParser`: ensure parsing never happens in the main thread
(#2123) via NachoSoto (@NachoSoto)
* `PostReceiptDataOperation`: also print receipt data with `verbose`
logs (#2127) via NachoSoto (@NachoSoto)
* `BasePurchasesTests`: detecting and fixing many `DeviceCache` leaks
(#2105) via NachoSoto (@NachoSoto)
* `StoreKitIntegrationTests`: added test to check applying a promotional
offer during subscription (#1588) via NachoSoto (@NachoSoto)
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

None yet

Projects

None yet

Development

Successfully merging this pull request may close these issues.

2 participants