Fixed minor bug causing huge memory leak.

main
sixtenhugosson 2023-12-26 11:53:10 +01:00
parent b2be6558e7
commit 46c3075258
2 changed files with 6 additions and 8 deletions

View File

@ -175,7 +175,7 @@ static void ArenaPopTo(arena *Arena, u64 Position)
arena *Target = Arena; arena *Target = Arena;
for(int ArenaIndex = 0; ArenaIndex < Position/Arena->Size; ++ArenaIndex) for(int ArenaIndex = 0; ArenaIndex < Position/Arena->Size; ++ArenaIndex)
{ {
Target = Arena->Next; Target = Target->Next;
} }
// sixten: deallocate all arenas that are no longer needed // sixten: deallocate all arenas that are no longer needed

View File

@ -346,8 +346,6 @@ static void SV_DrawBackground(scene_view *SceneView, ui_box *Box, render_group *
render_handle Texture = TextureFromAssetID(SceneView->Runtime.Compiled.BackgroundTexture); render_handle Texture = TextureFromAssetID(SceneView->Runtime.Compiled.BackgroundTexture);
//- sixten: render background //- sixten: render background
// sixten(TODO, but soon): Currently we add Box->Rect.Min to everything, but that should really be a transform
// on the render group.
#if 0 #if 0
persist r32 Time = 0; persist r32 Time = 0;
Time += 1 / 1200.0f; Time += 1 / 1200.0f;
@ -503,11 +501,11 @@ static ui_signal SV_BuildNavItem(scene_nav_item *Item, r32 GlobalScale, v2_r32 G
UI_SetNextHoverCursor(PlatformCursor_Hand); UI_SetNextHoverCursor(PlatformCursor_Hand);
ui_box *ItemBox = UI_MakeBoxF(UI_BoxFlag_Clickable|UI_BoxFlag_FloatingX|UI_BoxFlag_FloatingY, ui_box *ItemBox = UI_MakeBoxF(UI_BoxFlag_Clickable|UI_BoxFlag_FloatingX|UI_BoxFlag_FloatingY,
"View Item Box %i %S %p", "View Item Box %i %S %p",
(U32FromRawR32(Item->Scale)<<4)+ (U32FromRawR32(Item->Scale)<<4)+
(U32FromRawR32(Item->Origin.x)<<17)+ (U32FromRawR32(Item->Origin.x)<<17)+
(U32FromRawR32(Item->Origin.y)<<11), (U32FromRawR32(Item->Origin.y)<<11),
Item->HoverText, Item); Item->HoverText, Item);
UI_EquipBoxCustomDrawCallback(ItemBox, BuildNavItemDrawCallback, Data); UI_EquipBoxCustomDrawCallback(ItemBox, BuildNavItemDrawCallback, Data);
ui_signal Signal = UI_SignalFromBox(ItemBox); ui_signal Signal = UI_SignalFromBox(ItemBox);