mirror of
https://github.com/aseprite/aseprite.git
synced 2025-01-29 12:32:52 +00:00
Fix memory leaks (old "screen" bitmap) when resizing the window.
This commit is contained in:
parent
60cb43d18c
commit
7768f2c45c
@ -820,6 +820,7 @@ static BITMAP* osx_qz_window_acknowledge_resize(void)
|
||||
|
||||
/* destroy the screen */
|
||||
private_osx_destroy_screen_data();
|
||||
destroy_bitmap(pseudo_screen);
|
||||
|
||||
/* change the size of the view */
|
||||
[qd_view setFrameSize: NSMakeSize(w, h)];
|
||||
|
@ -782,9 +782,12 @@ static BITMAP *gfx_directx_acknowledge_resize(void)
|
||||
w -= (w % 4);
|
||||
|
||||
_enter_gfx_critical();
|
||||
|
||||
/* Destroy old screen */
|
||||
destroy_bitmap(gfx_directx_forefront_bitmap);
|
||||
_destroy_directx_forefront_bitmap();
|
||||
|
||||
/* Re-create the screen */
|
||||
_destroy_directx_forefront_bitmap();
|
||||
new_screen = _create_directx_forefront_bitmap(w, h, color_depth);
|
||||
|
||||
_exit_gfx_critical();
|
||||
|
@ -951,6 +951,7 @@ void _xwin_destroy_screen(void)
|
||||
static BITMAP *_xwin_private_rebuild_screen(int w, int h, int color_depth)
|
||||
{
|
||||
_xwin_private_destroy_screen_data();
|
||||
destroy_bitmap(screen);
|
||||
|
||||
/* Save dimensions. */
|
||||
_xwin.window_width = w;
|
||||
|
Loading…
x
Reference in New Issue
Block a user