Memory leakage in simple console application

It might have to do, that the message queue is never run. Jules explains it here:

Following Xenakios: this one is save to ignore.