added a note about closing messages to avoid memory leaks