I would like to delete a database file used to feed a a FeatureModelSource, as soon as the associated model layer is removed. Currently, I am using the MapCallback::onMapModelChanged and check if the calling action is REMOVE_MODEL_LAYER, then delete the database, but it fails; it seems there is still a reference or something on it.
Is there a way to be notified when the FeatureModelSource is actually released? Thank you for your help
The way you are going it is correct - there isn't any other notification. If you happen to track down the reason for the dangling reference (if that's the problem) let us know or please submit a PR. Thanks.