move mutex to heap