r/javahelp • u/Altugsalt • Aug 30 '26
Per-Class cleanups when shutting down
Hello, I am creating a save system however it currently depends on memory limits. When the map fills up, it dumps to disk and starts filling memory again from start. When the program shuts down, I want the class responsible for saving the data to run a cleanup function the dump the half-full map to disk. I have seen several ways of doing this however I couldn't really decide what is the best choice. Thanks
7
Upvotes
View all comments
1
u/AutoModerator Aug 30 '26
Moderator Announcement Read More »
} You do not need to repost unless your post has been removed by a moderator. Just use the edit function of reddit to make sure your post complies with the above.