If you create new RealmConfiguration and then call Realm.getInstance(configuration)
it will use the internal cache. If i delete the realm file, then create new instance of configuration calling of Realm.getInstance(configuration) won't create new Realm instance and realm file (or reload it) again. I need to force Realm to do so and skip or clean the internal cache.
Calling
realm.close();
seems to does the job. But you have to make sure you capture only one local Realm variable or one close() call won't work.Bad example:
Good example: