ActiveMQ has memory leak in activemq-jdbc-store module.
In this class org.apache.activemq.store.jdbc.JdbcMemoryTransactionStore there are two HashMaps: topicStores and queueStore. And these maps are filled with topics and queues meta information when new topic or queue is created. But there is no code that removes data from these maps.
So when dynamic queue or topic creation with following auto deleting of empty destinations is used broker gets OutOfMemoryError after some time.
It's needed to remove destination from these maps and may be other similar collections when auto deleting mechanism deletes inactive destination.