Found a memory leak
This commit is contained in:
@@ -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
|
||||
|
||||
@@ -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;
|
||||
}
|
||||
|
||||
|
||||
Reference in New Issue
Block a user