mirror of
https://github.com/italicsjenga/agb.git
synced 2024-12-23 16:21:33 +11:00
deallocate palettes
This commit is contained in:
parent
57f24acdf9
commit
6007b95926
|
@ -81,6 +81,12 @@ struct PaletteVramData {
|
||||||
location: Location,
|
location: Location,
|
||||||
}
|
}
|
||||||
|
|
||||||
|
impl Drop for PaletteVramData {
|
||||||
|
fn drop(&mut self) {
|
||||||
|
unsafe { PALETTE_ALLOCATOR.dealloc(self.location.as_palette_ptr(), Palette16::layout()) }
|
||||||
|
}
|
||||||
|
}
|
||||||
|
|
||||||
#[derive(Debug)]
|
#[derive(Debug)]
|
||||||
pub struct PaletteVram {
|
pub struct PaletteVram {
|
||||||
data: Rc<PaletteVramData>,
|
data: Rc<PaletteVramData>,
|
||||||
|
|
Loading…
Reference in a new issue