aerie icon indicating copy to clipboard operation
aerie copied to clipboard

Make MissionModels implement `AutoClosable`

Open Mythicaeda opened this issue 1 year ago • 0 comments

Follow up from a discussion with @DavidLegg.

Having mission models implement AutoClosable would allow them to clean up, for example, network resources or, specific to our discussion, save off a cache/log.

This would additionally allow us to resolve the TODO on L298 of LocalMissionModelService by wrapping the return in a try-with-resources to get the model. By having the close run explicitly outside of the simulation context, this should also prevent the model's close from doing anything sneaky with simulation/sim resources.

Mythicaeda avatar Feb 02 '24 00:02 Mythicaeda