don't allocate entire app on heap

This commit is contained in:
SimoneN64
2023-06-12 10:13:50 +02:00
parent 91575fe4df
commit 0b21f16ea6
4 changed files with 30 additions and 30 deletions

View File

@@ -8,7 +8,7 @@ struct Window;
namespace n64 {
struct Core {
~Core() { Stop(); }
~Core() { Stop(); delete cpu; }
Core();
void Stop();
void LoadROM(const std::string&);
@@ -23,6 +23,6 @@ struct Core {
bool romLoaded = false;
bool done = false;
std::string rom;
Interpreter cpu;
Interpreter* cpu = nullptr;
};
}