added beam_release_string() which is used instead of free() in the Python librtary