From e0babc53b16ef49ff40db21bbc4326e6e23185fa Mon Sep 17 00:00:00 2001 From: untir_l <87096069+untir-l@users.noreply.github.com> Date: Wed, 2 Mar 2022 20:48:28 +0530 Subject: Web: add comment to explain rationale behind a technical decision --- web/hitomezashi_web.c | 4 ++++ 1 file changed, 4 insertions(+) diff --git a/web/hitomezashi_web.c b/web/hitomezashi_web.c index 539fa96..0a36a2c 100644 --- a/web/hitomezashi_web.c +++ b/web/hitomezashi_web.c @@ -62,6 +62,10 @@ int EMSCRIPTEN_KEEPALIVE main(void) { SDL_RenderCopy(renderer, texture, NULL, NULL); SDL_RenderPresent(renderer); + // Since this is a short-lived application which is only run on page load, + // we do not need to delay the exit of main by freeing memory - it will be + // reclaimed by the browser automatically. + return Hitomezashi_Web_Result_Success; } -- cgit v1.2.3-57-g22cb