Allocating heaps can be expensive. It is sometimes more expensive to free than it is to allocate.