This cleans up un-committed files (if they don't have a primary key id set).
This prevents orphan files of objects that were created and for some reason saved to disk / archive, but were never persisted.
With this we can also remove the ImageAlignment.temp_images list that was used to help prevent build up of temporary aligned images and their associated files.
This doesn't seem to work, since the __del__ gets called as soon as you merge an object and throw away its reference in favor of the new object.
I will need to come up with a new idea.
This cleans up un-committed files (if they don't have a primary key
id
set). This prevents orphan files of objects that were created and for some reason saved to disk / archive, but were never persisted.With this we can also remove the
ImageAlignment.temp_images
list that was used to help prevent build up of temporary aligned images and their associated files.