From 39aa3ca51d03d6a80f32e2aa3972884af36bee75 Mon Sep 17 00:00:00 2001 From: Kayne Ruse Date: Sun, 2 Oct 2022 14:20:01 +0100 Subject: [PATCH] Found a memory leak --- README.md | 8 ++++++++ core/lib_engine.c | 5 +++++ 2 files changed, 13 insertions(+) diff --git a/README.md b/README.md index 74f5d15..d1bf942 100644 --- a/README.md +++ b/README.md @@ -4,10 +4,18 @@ The best way to build a game engine, is to build a game first. This game utilizes the [Toy programming langauge](https://toylang.com). +## Cloning + +Either clone recursively, or run `git submodule update --init` after cloning. + ## Building Simply run `make` in the root directory. +## Running + +Make sure the program can see the `assets` folder (symbolic links can help). + ## Dependencies * SDL2 diff --git a/core/lib_engine.c b/core/lib_engine.c index d53f8a4..138ad35 100644 --- a/core/lib_engine.c +++ b/core/lib_engine.c @@ -138,6 +138,11 @@ static int nativeInitWindow(Interpreter* interpreter, LiteralArray* arguments) { //only run with a window engine.running = true; + freeLiteral(caption); + freeLiteral(screenWidth); + freeLiteral(screenHeight); + freeLiteral(fscreen); + return 0; }