This is what the documentation has to say about accessing a realm using GCD:
"You should use an explicit autorelease pool when accessing a Realm from a dispatch queue."
I have used this practice in my app but I am suddenly seeing the following message in my console: "RLMRealm instance was deallocated during a write transaction".
It is not throwing an error, it is just silently printing it to the console. Nothing is written to the database.
I found this issue on github that seems very similar.
My question is now: What practice should I use? The one used in the Realm documentation or the answer found in the github issue?
Thanks for any clarification.
nothing too bad will happen; just the size of the Realm file on disk will increase.
if it takes too long, your Realm size can increase drastically (depending on the number of concurrent threads), though. – Verney