Fixed a memory leak when a connection is closed the topics should also be removed if they are empty
Merge branch 'refs/heads/easen'