# HG changeset patch # User František Kučera # Date 1513876415 -3600 # Node ID 379c490a9831cde2ff53e382dc25b09abbc4d89f # Parent d55ac7dbc2e6f7647c058e4d7386f63fc5319acc malloc + free diff -r d55ac7dbc2e6 -r 379c490a9831 c++/rgb-assembler/rgb-assembler.cpp --- a/c++/rgb-assembler/rgb-assembler.cpp Thu Dec 21 17:52:30 2017 +0100 +++ b/c++/rgb-assembler/rgb-assembler.cpp Thu Dec 21 18:13:35 2017 +0100 @@ -78,7 +78,7 @@ writeCommand(memory, a, CMD_SLEEP); writeSleep(memory, a, 255); writeCommand(memory, a, CMD_GOTO); - writeAddress(memory, a, a+4); + writeAddress(memory, a, a + 4); writeCommand(memory, a, 1); writeCommand(memory, a, 1); writeCommand(memory, a, CMD_SLEEP); @@ -118,6 +118,8 @@ + free(memory); + memory = nullptr; wprintf(L"all done\n"); return 0; }