mirror of
https://github.com/pevans/erc-c.git
synced 2024-12-21 23:29:16 +00:00
Properly free main/aux memory
This commit is contained in:
parent
8d9b48912e
commit
24e6e0fd25
@ -46,6 +46,7 @@ apple2_create(int width, int height)
|
|||||||
// properly; that way, we won't try to free garbage data
|
// properly; that way, we won't try to free garbage data
|
||||||
mach->rom = NULL;
|
mach->rom = NULL;
|
||||||
mach->ram2 = NULL;
|
mach->ram2 = NULL;
|
||||||
|
mach->main = NULL;
|
||||||
mach->sysfont = NULL;
|
mach->sysfont = NULL;
|
||||||
mach->screen = NULL;
|
mach->screen = NULL;
|
||||||
mach->drive1 = NULL;
|
mach->drive1 = NULL;
|
||||||
@ -265,6 +266,14 @@ apple2_free(apple2 *mach)
|
|||||||
vm_segment_free(mach->ram2);
|
vm_segment_free(mach->ram2);
|
||||||
}
|
}
|
||||||
|
|
||||||
|
if (mach->main) {
|
||||||
|
vm_segment_free(mach->main);
|
||||||
|
}
|
||||||
|
|
||||||
|
if (mach->aux) {
|
||||||
|
vm_segment_free(mach->aux);
|
||||||
|
}
|
||||||
|
|
||||||
if (mach->sysfont) {
|
if (mach->sysfont) {
|
||||||
vm_bitfont_free(mach->sysfont);
|
vm_bitfont_free(mach->sysfont);
|
||||||
}
|
}
|
||||||
|
Loading…
Reference in New Issue
Block a user