nicola cabiddu
nicola cabiddu
I am demoting this to draft, I need to clean up the code, fix a bunch of issues and review the main functions, this is not by any means ready...
this is now ready for review @ironage
@ironage I fixed all the comments, now I am going to try to integrate your PR: https://github.com/realm/realm-core/pull/5773/ into this one.
Technically, you get an instance of realm in the initialization_function passed as argument, thus you could close the realm at that stage. However, failures can occur even before the initialization_function...
Yes indeed, it can also happen before that, so realm must be closed. And probably this is the reason behind why certain object store tests are not running correctly on...
@nirinchev can you provide a sample of code that is leaking the realm? As per @tgoyne request, he does not believe we should implement a fix for that inside core....
@tgoyne what you are proposing seems to me something bigger in terms of code, and for sure will complicate the code, although it will surely work for `initialDataCallback`. However, this...
Well, both fixes need to be placed in the same code path, we need to catch the exception thrown, close realm/delete the file and re-throw. https://github.com/realm/realm-core/issues/5364 is essentially a super...
If I recall correctly, the main problem in calling explicitly `close()` at ObjectStore level is that you cannot do that safely in regard to multiple processes that might be using...
@nirinchev I am not sure if this is a T-bug (or something to keep in the core backlog), a Realm instance at object store level is just keeping track of...