When are persistent objects that are not committed removed from memory?
We had a developer discussion in the office about when persistent objects are removed from memory if these objects are not committed. Do they stay in memory untill the server is restarted? Or is there a internal Mendix action that clears these objects after a certain time? So if a user creates an object (but not commit the object) and for some reason the user does not finish the proces (closes the browser etc.) what will happen to this object? For non-persistent objects it is clear. Mendix will detect that the object is no longer used and remove it from memory. But we are not sure the same is done for persistent objects. Regards, Ronald
It's the same for persistent objects that are never committed and are not related to any object that is still reachable.
This is not related to your question but may still be interesting:
When a persistent object IS related to something else and that related object is committed but the initial object isn't, then this object is committed as well automatically when necessary to keep the database in a valid state, but these objects will get an auto-committed status. They are removed from the database when the user that created them logs out or when the server shuts down. The cases when this happens are always either a modelling error or a case where a user closes his browser or navigates away in the middle of a process.