I launched Instruments for the first time, and had a play around. I am happy to see that I have no leaks no matter how much I try to stress my application. To verify that leaks are indeed detected, I removed one 'free()' to see if it detected that leak. It did as expected. I am also assuming that 'Live Bytes' and '#Living' are the numbers I am interested in if I want to see if my application is eating memory.
What I am observing is, that even if there are no leaks detected, there are groups of memory allocations that go up and up and up.
One that steadily increases is 'Malloc 64 Bytes'. I was wondering about what that could be, since there is nowhere in my code that 'malloc(64)'. At least not in a steadily fashion. And it is not leaked!
I was thinking that maybe there is a GUI element that is exhibiting this behaviour. The only GUI element I have that could fit this, is a NSSlider I have to track song position. That was easily tested: I just paused the song, and the slider would stop updating. The steady rise of 'Malloc 64 Bytes' stopped too. Then I dragged the slider, and the number started to go up again. In fact, I have found that usage of any GUI element exhibits this behaviour for allocations of various amounts of memory. Nothing is ever leaked.
Is this some kind of internal optimisation that I don't need to worry about? Is there any way I can stop this from happening? What is really happening? Will it eventually be freed during the course of my program?
If I have a closer look at which part of the program that is allocating this memory, I see an overwhelming amounts allocated from 'QuartzCore'. Other names I see is 'AppKit', 'Foundation', 'Shortcut' and 'Core*' where '*' is 'Graphics' and 'Image'.
Responsible caller for 'QuartzCore' is 'CA::Context::commit_transaction(CA::Transaction*)'.
There is no part of my code listed as having allocated any of this memory.