Opened 11 years ago
Last modified 8 years ago
#524 confirmed task
Avoid using atexit()
Reported by: | takkaria | Owned by: | |
---|---|---|---|
Milestone: | Future | Keywords: | cleanup |
Cc: |
Description
A couple of places in the code currently use this -- fix them.
Change History (9)
comment:1 Changed 10 years ago by d_m
comment:2 Changed 10 years ago by d_m
- Owner set to d_m
- Status changed from new to assigned
comment:3 Changed 10 years ago by d_m
From IRC:
< takkaria> no, that isn't the right behaviour either
< takkaria> the point here is to have alloc/dealloc functions which are called in the right places rather than exit() or quit() dealign with it
< takkaria> it's part of a broader change, really, to try and init whole-game stuff and per-game stuff so at some point we can make new characters and load new savefiles while running without causing memory eaks
comment:4 Changed 10 years ago by d_m
- Status changed from assigned to confirmed
comment:5 Changed 10 years ago by d_m
- Owner d_m deleted
- Status changed from confirmed to assigned
comment:6 Changed 10 years ago by takkaria
- Milestone changed from 3.1.1 beta to 3.1.2 beta
- Status changed from assigned to confirmed
comment:7 Changed 10 years ago by magnate
- Keywords cleanup added
comment:8 Changed 8 years ago by magnate
- Milestone changed from 3.2.0 to 3.3.0
- Type changed from bug to task
Moving to 3.3 and assinging to elly as I can't see anyone else doing this ...
comment:9 Changed 8 years ago by magnate
- Milestone changed from 3.3.0 to Future
Punting in accordance with new milestone policy (that any other milestone is only set once someone is actually working on the ticket).
Would an OK resolution be to move the hooks into quit() in z-util.c? It looks like main() from main.c calls quit() at the end, and it seems like most of the other points out of the game call quit().
There are some places where exit() is called directly but we should probably quit. Assuming this resolution seems OK, I'll fix those up too.