mirror of
https://github.com/tildearrow/furnace.git
synced 2025-01-05 15:11:19 +00:00
Game Boy: fix memory leak
This commit is contained in:
parent
3f668a59e5
commit
c1ff3c38aa
1 changed files with 6 additions and 2 deletions
|
@ -674,8 +674,6 @@ void DivPlatformGB::setFlags(const DivConfig& flags) {
|
|||
CHECK_CUSTOM_CLOCK;
|
||||
rate=chipClock/16;
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
oscBuf[i]->rate=rate;
|
||||
}
|
||||
}
|
||||
|
@ -686,6 +684,12 @@ int DivPlatformGB::init(DivEngine* p, int channels, int sugRate, const DivConfig
|
|||
skipRegisterWrites=false;
|
||||
model=GB_MODEL_DMG_B;
|
||||
gb=new GB_gameboy_t;
|
||||
|
||||
for (int i=0; i<4; i++) {
|
||||
isMuted[i]=false;
|
||||
oscBuf[i]=new DivDispatchOscBuffer;
|
||||
}
|
||||
|
||||
setFlags(flags);
|
||||
reset();
|
||||
return 4;
|
||||
|
|
Loading…
Reference in a new issue