What does the command afplay --leaks do?
--leaks analyzes memory leaks. Running strings /usr/bin/afplay strongly indicates that
leaks -nocontext %d | tee /tmp/leaks_P%d.log
x=`cat /tmp/leaks_P%d.log |grep -i Leak: | wc -l`
exit $x

is actually run for this. man leaks will give a lot of additional details about what that command does.