Fixed memory leak and added "append" keyword for margins in SCORINFO
After glancing through the source code, I noticed that when ScoreMargin::CommandBlock::ParseBlock
is called (i.e. ScoreMargin::Parse
), it clears the array of commands without deleting the command objects themselves like it does in ScoreMargin::CommandBlock::Clear
. Without deleting these commands, and no way of referencing them again, it can cause a memory leak. This MR fixes the memory leak by calling the aforementioned member function to clear everything.
I also added an optional append
keyword that comes after the name of the margin being edited (e.g. MainHeader append { }
) so that any commands that were in the margin before aren't deleted, allowing users to make edits to the margins without clearing everything.